Skip to content
/ env Public

golang env package use for docker, usage like flag

Notifications You must be signed in to change notification settings

kiyor/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use with flag package

func init() {
	env.Add(env.New("HTTP_PROXY","proxy use for call"))
}
func main() {
	flag.Usage = func() {
	    fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
	    flag.PrintDefaults()
	    fmt.Println("Support ENV:")                                                                                         
	    env.PrintDefaults()
	}
	flag.Parse()
}

About

golang env package use for docker, usage like flag

Resources

Stars

Watchers

Forks

Packages

No packages published