We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58c7510 commit c8aeae9Copy full SHA for c8aeae9
1 file changed
application/config.go
@@ -70,6 +70,19 @@ func (c *Configuration) GetInt64(env string) int64 {
70
return val
71
}
72
73
+func (c *Configuration) GetInt16(env string) int16 {
74
+ fmt.Printf("GetConfigInt64: %v", env)
75
+ envVar := strings.ToUpper(strings.ReplaceAll(env, ".", "_"))
76
+ c.configReader.SetDefault(env, c.configReader.GetInt(env))
77
+ err := c.configReader.BindEnv(env, envVar)
78
+ if err != nil {
79
+ panic(err)
80
+ }
81
+ val := c.configReader.GetInt(env)
82
+ fmt.Printf("=%v\n", val)
83
+ return int16(val)
84
+}
85
+
86
func (c *Configuration) GetDuration(env string) time.Duration {
87
fmt.Printf("GetConfigDuration: %v", env)
88
envVar := strings.ToUpper(strings.ReplaceAll(env, ".", "_"))
0 commit comments