Skip to content

Little library for converting environment variable to certain type

License

Notifications You must be signed in to change notification settings

MarcSky/environ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

environ

Library for converting environment variable to certain type

Smooth conversation

Smooth conversation (with default value if env not exist) string to

  • int
  • int64
  • uint64
  • string (with default value)
  • float64

Example ServerPort := environ.StrGetEnv("SERVER_PORT", 80)

Strict conversation

Strict conversation (with panic if var not exist) string to

  • int
  • int64
  • uint64
  • string
  • float64

Example ServerPort := environ.MustGetString("SERVER_PORT")

About

Little library for converting environment variable to certain type

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages