https://github.com/moovweb/gpkg
Go Package Manager for GVM
https://github.com/moovweb/gpkg
Last synced: about 1 year ago
JSON representation
Go Package Manager for GVM
- Host: GitHub
- URL: https://github.com/moovweb/gpkg
- Owner: moovweb
- Created: 2012-03-02T04:48:23.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-12T00:14:23.000Z (about 14 years ago)
- Last Synced: 2025-03-23T00:41:20.436Z (about 1 year ago)
- Language: Go
- Homepage: http://github.com/moovweb/gpkg
- Size: 218 KB
- Stars: 5
- Watchers: 44
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#gpkg
gpkg is the package manager for http://github.com/moovweb/gvm.
Once you've installed Go using the instructions found at http://github.com/moovweb/gvm you'll have the gpkg command.
##Creating your first package
Creating a gpkg package is pretty simple.
`````
mkdir example1
cd example1
echo "package main
func main() {
println(\"Hello World\")
}" >> main.go
gpkg build example1
example1
``````
##Creating and using a custom library
gpkg uses a special Package.gvm file to make imports available during compile time. See the following example:
`````
mkdir lib1
cd lib1
echo "package lib1
func Hello(name string) {
println(\"Hello\", name)
}" >> lib1.go
gpkg build lib1
cd ..
mkdir example2
cd example2
echo "pkg lib1" >> Package.gvm
echo "package main
import \"lib1\"
func main() {
lib1.Hello(\"Josh\")
}" >> main.go
gpkg build example2
example2
`````
##Sources
gpkg uses a list of sources to find packages for `gpkg install`. You can add and remove source via the gpkg command:
* Add a source
`gpkg sources add github.com/moovweb`
* Remove a source
`gpkg sources remove github.com/badrepo`