https://github.com/factomproject/gobundle
Provides a tool & API for bundling resources with Go
https://github.com/factomproject/gobundle
Last synced: 10 months ago
JSON representation
Provides a tool & API for bundling resources with Go
- Host: GitHub
- URL: https://github.com/factomproject/gobundle
- Owner: FactomProject
- License: mit
- Created: 2014-09-10T22:15:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-03T06:02:01.000Z (about 11 years ago)
- Last Synced: 2024-04-15T01:38:05.005Z (almost 2 years ago)
- Language: Go
- Size: 105 KB
- Stars: 5
- Watchers: 15
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gobundle
###### v1.1
Provides a tool & API for bundling resources with Go
Gobundle provides a command for packing resources into a go executable.
Given a list of packages, for each package, it finds all of the files in
`/bundle/`, tars and gzips them, writing the resulting data
to a byte array in `/bundle.go`. The available flags are:
* --file: if present, the data will be written to the argument as a tar. The resulting file will be an
actual tar, as opposed to the golang byte array literal that is written to
bundle.go. This is primarily for testing purposes.
To use the gobundle package, `import "github.com/FactomProject/gobundle"`,
set `gobundle.Setup.Application.Name` to your application name, and call
`gobundle.Init()` (which calls `flag.Parse()`). The available flags are:
* --conf: sets the configuration directory path; default value depends on the OS
* --data: sets the data directory path; default value depends on the OS
* --unpack <arg>:
* suppress: Don't unpack
* unpack[,force]: Do unpack
* detect[,force]: Unpack if the conf and data are non-extant
* only[,force]: Unpack and exit
* `force` forces unpack, overwriting extant files
## Change log
#### v1.1
Added --file for the command.
#### v1.0
Initial Release