Documentation ¶
Overview ¶
*
- cli is a package intended to encourage some standardization in the
- command line user interface for programs developed for Caltech Library. *
- @author R. S. Doiel, <rsdoiel@library.caltech.edu> *
- Copyright (c) 2021, Caltech
- All rights not granted herein are expressly reserved by Caltech. *
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. *
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*
- cli is a package intended to encourage some standardization in the command line user interface for programs
- developed for Caltech Library. *
- @author R. S. Doiel, <rsdoiel@caltech.edu> *
- Copyright (c) 2021, Caltech
- All rights not granted herein are expressly reserved by Caltech. *
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. *
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
generator.go - provides a quick and dirty skeleton for cli based apps.
manpage.go - adds man page output formatting suitable for running through `nroff -man` and rendering a man page. It is a part of the cli page.
Author: R. S. Doiel, <rsdoiel@library.caltech.edu>
Copyright (c) 2021, Caltech All rights not granted herein are expressly reserved by Caltech.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
markdown.go - this is a part of the cli package. This code focuses on generating Markdown docs from the internal help information.
usage.go - handles rendering the "usage" message for cli package
*
- cli is a package intended to encourage some standardization in the
- command line user interface for programs developed for Caltech Library. *
- @author R. S. Doiel, <rsdoiel@library.caltech.edu> *
- Copyright (c) 2021, Caltech
- All rights not granted herein are expressly reserved by Caltech. *
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. *
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. *
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
Index ¶
- Constants
- func CloseFile(filename string, fp *os.File) error
- func Create(filename string, fallbackFile *os.File) (*os.File, error)
- func ExitOnError(out *os.File, err error, quiet bool)
- func Generate(...) []byte
- func IsPipe(in *os.File) bool
- func OnError(out *os.File, err error, quiet bool)
- func Open(filename string, fallbackFile *os.File) (*os.File, error)
- func PopArg(args []string) (string, []string)
- func PushArg(s string, args []string) []string
- func ReadLines(in *os.File) ([]string, error)
- func ShiftArg(args []string) (string, []string)
- func UnshiftArg(s string, args []string) []string
- type Cli
- func (c *Cli) AddHelp(keyword string, usage []byte) error
- func (c *Cli) AppName() string
- func (c *Cli) Arg(i int) string
- func (c *Cli) Args() []string
- func (c *Cli) BoolVar(p *bool, names string, value bool, usage string)
- func (c *Cli) DurationVar(p *time.Duration, names string, value time.Duration, usage string)
- func (c *Cli) Env(name string) string
- func (c *Cli) EnvAttribute(name string) (*EnvAttribute, error)
- func (c *Cli) EnvBool(name string, value bool, usage string) *bool
- func (c *Cli) EnvBoolVar(p *bool, name string, value bool, usage string) error
- func (c *Cli) EnvDuration(name string, value time.Duration, usage string) *time.Duration
- func (c *Cli) EnvDurationVar(p *time.Duration, name string, value time.Duration, usage string) error
- func (c *Cli) EnvFloat64(name string, value float64, usage string) *float64
- func (c *Cli) EnvInt(name string, value int, usage string) *int
- func (c *Cli) EnvInt64(name string, value int64, usage string) *int64
- func (c *Cli) EnvInt64Var(p *int64, name string, value int64, usage string) error
- func (c *Cli) EnvIntVar(p *int, name string, value int, usage string) error
- func (c *Cli) EnvString(name string, value string, usage string) *string
- func (c *Cli) EnvStringVar(p *string, name string, value string, usage string) error
- func (c *Cli) EnvUint(name string, value uint, usage string) *uint
- func (c *Cli) EnvUint64(name string, value uint64, usage string) *uint64
- func (c *Cli) EnvUint64Var(p *uint64, name string, value uint64, usage string) error
- func (c *Cli) EnvUintVar(p *uint, name string, value uint, usage string) error
- func (c *Cli) Float64Var(p *float64, names string, value float64, usage string)
- func (c *Cli) GenerateManPage(w io.Writer)
- func (c *Cli) GenerateMarkdown(w io.Writer)
- func (c *Cli) Getenv(name string) string
- func (c *Cli) Help(keywords ...string) string
- func (c *Cli) Int64Var(p *int64, names string, value int64, usage string)
- func (c *Cli) IntVar(p *int, names string, value int, usage string)
- func (c *Cli) License() string
- func (c *Cli) NArg() int
- func (c *Cli) NewVerb(name string, usage string, ...) *Verb
- func (c *Cli) Option(op string) string
- func (c *Cli) Options() map[string]string
- func (c *Cli) Parse() error
- func (c *Cli) ParseEnv() error
- func (c *Cli) ParseOptions()
- func (c *Cli) Run(args []string) int
- func (c *Cli) SetParams(params ...string)
- func (c *Cli) StringVar(p *string, names string, value string, usage string)
- func (c *Cli) Uint64Var(p *uint64, names string, value uint64, usage string)
- func (c *Cli) UintVar(p *uint, names string, value uint, usage string)
- func (c *Cli) Usage(w io.Writer)
- func (c *Cli) Verb(args []string) string
- func (c *Cli) Verbs() map[string]string
- func (c *Cli) Version() string
- type EnvAttribute
- type Verb
- func (v *Verb) AddFlagSet(flagSet *flag.FlagSet)
- func (v *Verb) AddHelp(keyword string, usage []byte) error
- func (v *Verb) Arg(i int) string
- func (v *Verb) Args() []string
- func (v *Verb) BoolVar(p *bool, names string, value bool, usage string)
- func (v *Verb) DurationVar(p *time.Duration, names string, value time.Duration, usage string)
- func (v *Verb) Float64Var(p *float64, names string, value float64, usage string)
- func (v *Verb) HasOptions() bool
- func (v *Verb) Help(keywords ...string) string
- func (v *Verb) Int64Var(p *int64, names string, value int64, usage string)
- func (v *Verb) IntVar(p *int, names string, value int, usage string)
- func (v *Verb) NArg() int
- func (v *Verb) Option(op string) string
- func (v *Verb) Options() map[string]string
- func (v *Verb) Parse(args []string) error
- func (v *Verb) SetParams(params ...string)
- func (v *Verb) String() string
- func (v *Verb) StringVar(p *string, names string, value string, usage string)
- func (v *Verb) Uint64Var(p *uint64, names string, value uint64, usage string)
- func (v *Verb) UintVar(p *uint, names string, value uint, usage string)
Constants ¶
const (
LicenseText = `` /* 1530-byte string literal not displayed */
)
const Version = "0.0.18"
Variables ¶
This section is empty.
Functions ¶
func CloseFile ¶
CloseFile accepts a filename and os.File pointer, if filename is "" or "-" it skips the close otherwise is does a fp.Close() on the file.
func Create ¶
Create accepts a filename, fallbackFile (usually os.Stdout, os.Stdin, os.Stderr) and returns a file pointer and error. It is a conviences function for wrapping stdin, stdout, stderr If filename is "-" or filename is "" then fallbackFile is used.
func ExitOnError ¶
ExitOnError is used by the cli programs to handle exit cuasing errors constitantly. E.g. it respects the -quiet flag past to it.
func Generate ¶ added in v0.0.13
func Generate(appName, synopsis, author, descriptionFName, examplesFName, bugsFName, licenseFName string) []byte
Generate creates main.go source code
func IsPipe ¶
IsPipe accepts a file pointer and returns true if data on file pointer is from a pipe or false if not.
func OnError ¶
OnError writes an error message to out if err != nil taking into consideration the state of quiet
func Open ¶
Open accepts a filename, fallbackFile (usually os.Stdout, os.Stdin, os.Stderr) and returns a file pointer and error. It is a conviences function for wrapping stdin, stdout, stderr If filename is "-" or filename is "" then fallbackFile is used.
func PopArg ¶
PopArg takes an array pops the last element returning the element and an updated array. If no elements are left then a empty string and nil are turned.
func ShiftArg ¶ added in v0.0.13
ShiftArg takes an array of strings and if array is not empty returns a string and the rest of the args. If array is empty it returns an empty string, when there are no more args it returns nil for the arg parameter
func UnshiftArg ¶ added in v0.0.13
Unshift takes a string and an array of strings and returns a new array with the value of string as the first element and the rest are elements of the array of strings
Types ¶
type Cli ¶
type Cli struct { // In is usually set to os.Stdin In *os.File // Out is usually set to os.Stdout Out *os.File // Eout is usually set to os.Stderr Eout *os.File // Documentation specific help pages, e.g. -help example1 Documentation map[string][]byte // SectionNo is the numeric value section value for man page generation SectionNo int // VerbsRequired is true then USAGE line shows VERB rather than [VERB] VerbsRequired bool // contains filtered or unexported fields }
Cli models the metadata for running a common cli program
func NewCli ¶
NewCli creates an Cli instance, an Cli describes the running of the command line interface making it easy to expose the functionality in packages as command line tools.
func (*Cli) AddHelp ¶
AddHelp takes a string keyword and byte slice of content and updates the Documentation attribute
func (*Cli) BoolVar ¶
BoolVar updates c.options doc strings, then splits options and calls flag.BoolVar()
func (*Cli) DurationVar ¶
DurationVar updates c.options doc strings, then splits options and calls flag.DurationVar()
func (*Cli) EnvAttribute ¶
func (c *Cli) EnvAttribute(name string) (*EnvAttribute, error)
EnvAttribute returns the struct corresponding to the matchine name
func (*Cli) EnvBool ¶
EnvBool adds an environment variable which is evaluate before evaluating options returns a pointer to the value.
func (*Cli) EnvBoolVar ¶
EnvBoolVar adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.BoolVar()
func (*Cli) EnvDuration ¶
EnvDuration adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.DurationVar()
func (*Cli) EnvDurationVar ¶
func (c *Cli) EnvDurationVar(p *time.Duration, name string, value time.Duration, usage string) error
EnvDurationVar adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.DurationVar()
func (*Cli) EnvFloat64 ¶
EnvFloat64 adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.Float64Var()
func (*Cli) EnvInt ¶
EnvInt adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.IntVar()
func (*Cli) EnvInt64 ¶
EnvInt64 adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.Int64Var()
func (*Cli) EnvInt64Var ¶
EnvInt64Var adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.Int64Var()
func (*Cli) EnvIntVar ¶
EnvIntVar adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.IntVar()
func (*Cli) EnvString ¶
EnvString adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.StringVar()
func (*Cli) EnvStringVar ¶
EnvStringVar adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.StringVar()
func (*Cli) EnvUint ¶
EnvUint adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.UintVar()
func (*Cli) EnvUint64 ¶
EnvUint64 adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.Uint64Var()
func (*Cli) EnvUint64Var ¶
EnvUint64Var adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.Uint64Var()
func (*Cli) EnvUintVar ¶
EnvUintVar adds environment variable which is evaluate before evaluating options It is the environment counterpart to flag.UintVar()
func (*Cli) Float64Var ¶
Float64Var updates c.options doc strings, then splits options and calls flag.Float64Var()
func (*Cli) GenerateManPage ¶ added in v0.0.13
GenerateManPage writes a manual page suitable for running through `nroff --man`. May need some human clean up depending on content and internal formatting (e.g markdown style, spacing, etc.)
func (*Cli) GenerateMarkdown ¶ added in v0.0.13
GenerateMarkdown writes a Markdown page to io.Writer provided. Documentation is based on the application's metadata like app name, version, options, actions, etc.
func (*Cli) Help ¶
Help returns documentation on a topic. If first looks in Documentation map and and if not there return a not documented string.
func (*Cli) Int64Var ¶
Int64Var updates c.options doc strings, then splits options and calls flag.Int64Var()
func (*Cli) IntVar ¶
IntVar updates c.options doc strings, then splits options and calls flag.IntVar()
func (*Cli) NewVerb ¶ added in v0.0.16
func (c *Cli) NewVerb(name string, usage string, fn func(io.Reader, io.Writer, io.Writer, []string, *flag.FlagSet) int) *Verb
NewVerb associates a verb, synopsis and function with a command line interface. It supercedes AddVerb(), and AddAction(). Verbs can have their own options and documentation.
func (*Cli) ParseEnv ¶
ParseEnv loops through the os environment using os.Getenv() and updates c.env EnvAttribute. Returns an error if there is a problem with environment.
func (*Cli) ParseOptions ¶
func (c *Cli) ParseOptions()
ParseOptions envokes flag.Parse() updating variables set in AddOptions
func (*Cli) Run ¶
(c *Cli) Run takes a list of non-option arguments and runs them if the fist arg (i.e. arg[0] has a corresponding action. Returns an int suitable to passing to os.Exit()
func (*Cli) SetParams ¶ added in v0.0.16
Set Params generates explicit documentation for expected parameters instead of using those defined by verbs and actions.
func (*Cli) StringVar ¶
StringVar updates c.options doc strings, then splits options and calls flag.StringVar()
func (*Cli) Uint64Var ¶
Uint64Var updates c.options doc strings, then splits options and calls flag.Int64Var()
func (*Cli) UintVar ¶
UintVar updates c.options doc strings, then splits options and calls flag.Int64Var()
func (*Cli) Usage ¶
Usage writes a help page to io.Writer provided. Documentation is based on the application's metadata like app name, version, options, actions, etc.
func (*Cli) Verb ¶ added in v0.0.13
Verb returns the verb in an arg list without poping the verb. If arg list is empty then an empty string is returned.
type EnvAttribute ¶
type EnvAttribute struct { // Name is the environment variable (e.g. DATASET, USERNAME) Name string // Type holds the type name of the attribute, e.g. int, int64, float64, string, bool, uint, uint64, time.Duration Type string // BoolValue holds the default boolean BoolValue bool // IntValue holds the default int IntValue int // Int64Value holds the default int64 Int64Value int64 // UintValue holds the default uint UintValue uint // Uint64Value holds the default uint64 Uint64Value uint64 // Float64Value holds the default float64 Float64Value float64 // Dura1tionValue holds the default time.Duration DurationValue time.Duration // StringValue holds the default string StringValue string // Usage describes the environment variable role and expected setting Usage string }
EnvAttribute describes expected environmental attributes associated with the cli app. It also provides the default value of the environmental attribute if missing from the environment.
type Verb ¶ added in v0.0.16
type Verb struct { // Name of the verb Name string // Usage, a one line description Usage string // Documentation is a map to help documentation (usually detailed) Documentation map[string][]byte // SectionNo corresponds to the manual section number (used in generating man pages) SectionNo int // Fn holds the main function associated with the verb, often is passed // stdin, stdout and stnerror returns a value suitable for passing to // os.Exit() Fn func(io.Reader, io.Writer, io.Writer, []string, *flag.FlagSet) int // FlagSet holds the parsable options associated with the verb. FlagSet *flag.FlagSet // contains filtered or unexported fields }
Verb holds the metadata for an keyword action associated with a cli. e.g. `go test` would have the verb "test" and the Verb struct would define options related metadata associated with that verb.
func NewVerb ¶ added in v0.0.16
func NewVerb(name, usage string, fn func(io.Reader, io.Writer, io.Writer, []string, *flag.FlagSet) int) *Verb
NewVerb creates an Verb instance, and describes the running of the command line interface making it easy to expose the functionality in packages as command line tools.
func (*Verb) AddFlagSet ¶ added in v0.0.16
AddFlagSet adds/replaces a flag set associated with verbs
func (*Verb) AddHelp ¶ added in v0.0.16
AddHelp takes a string keyword and byte slice of content and updates the Documentation attribute
func (*Verb) BoolVar ¶ added in v0.0.16
BoolVar updates v.options doc strings, then splits options and calls v.FlagSet.BoolVar()
func (*Verb) DurationVar ¶ added in v0.0.16
DurationVar updates v.options doc strings, then splits options and calls v.FlagSet.DurationVar()
func (*Verb) Float64Var ¶ added in v0.0.16
Float64Var updates v.options doc strings, then splits options and calls v.FlagSet.Float64Var()
func (*Verb) HasOptions ¶ added in v0.0.16
HasOptions returns true if len(v.options) > 0, false otherwise
func (*Verb) Help ¶ added in v0.0.16
Help returns documentation on a topic. If first looks in Documentation map and if nothing found looks in Synopsis map and if not there return an empty string not documented string.
func (*Verb) Int64Var ¶ added in v0.0.16
Int64Var updates v.options doc strings, then splits options and calls v.FlagSet.Int64Var()
func (*Verb) IntVar ¶ added in v0.0.16
IntVar updates v.options doc strings, then splits options and calls v.FlagSet.IntVar()
func (*Verb) Option ¶ added in v0.0.16
Option returns an option's document string or unsupported string
func (*Verb) Parse ¶ added in v0.0.16
Parse envokes v.FlagSet.Parse() updating variables set in AddOptions
func (*Verb) SetParams ¶ added in v0.0.16
SetParams documents any parameters not defined as Options, it is an orders list of strings
func (*Verb) StringVar ¶ added in v0.0.16
StringVar updates v.options doc strings, then splits options and calls v.FlagSet.StringVar()
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
cligenerate
cligenerate is a cli application generator, e.g.
|
cligenerate is a cli application generator, e.g. |
pkgassets is a command line tool for harvesting directory contents (like website default files) and turning them into a Go package with a map of path and byte array of contents harvested.
|
pkgassets is a command line tool for harvesting directory contents (like website default files) and turning them into a Go package with a map of path and byte array of contents harvested. |