Documentation
¶
Overview ¶
This is an interceptor dedicated to push flags found to the final schema given by gautocloud. if flags is not a zero value it will override value from schema given by gautocloud. It use https://github.com/alexflint/go-arg to translate flags into a struct.
Example ¶
Output: arg_test.MyConfig{Foo:"bar", Bar:true, Orig:"<injected by gautocloud>"}
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Args ¶
func Args(args []string) optSetter
Option to set args to be parsed as flags Default: os.Args
func Config ¶
func Config(config arg.Config) optSetter
Option to set arg.Config from https://github.com/alexflint/go-arg Default: arg.Config{}
Types ¶
type ArgInterceptor ¶
type ArgInterceptor struct {
// contains filtered or unexported fields
}
func NewArg ¶
func NewArg(setters ...optSetter) *ArgInterceptor
func (ArgInterceptor) Intercept ¶
func (i ArgInterceptor) Intercept(current, found interface{}) (interface{}, error)
Click to show internal directories.
Click to hide internal directories.