envconf/tests/main.go

17 lines
318 B
Go
Raw Normal View History

2022-01-29 12:29:09 +00:00
package main
2022-01-29 12:31:31 +00:00
import (
"fmt"
"git.purser.it/roypur/envconf"
)
2022-01-29 12:29:09 +00:00
func main() {
conf := envconf.NewConfig()
2022-01-29 20:51:28 +00:00
conf.Define("this_is_a_map", envconf.TypeInt)
2022-01-29 21:03:33 +00:00
conf.DefineMap("test_map", envconf.TypeInt)
2022-01-29 12:29:09 +00:00
conf.Parse()
conf.Status()
2022-03-27 12:32:28 +00:00
fmt.Println(conf.GetMapMapInt("test_map"))
2022-01-29 20:59:03 +00:00
fmt.Println(conf.GetInt("this_is_a_map"))
2022-01-29 12:29:09 +00:00
}