func main() { adaptflag.AdaptWithFunc(func(info adaptflag.Info) { flag.Var(info.Value, info.Name, info.Usage) }) flag.Parse() }
func main() { tgt := &Config{} c := cstruct.MustNew(tgt, "example") configurable.Register(c) adaptflag.AdaptWithFunc(func(info adaptflag.Info) { flag.Var(info.Value, info.Name, info.Usage) }) flag.Parse() err := adaptconf.Load("exampleapp2") if err != nil { fmt.Printf("%v\n", err) } fmt.Printf("%#v\n", tgt) }