Skip to content
This repository was archived by the owner on Mar 8, 2026. It is now read-only.

Commit 20fa81d

Browse files
committed
fix GetFloat32WithDefault
1 parent 2f9a604 commit 20fa81d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

env/env.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func GetIntWithDefault(key string, defaultValue int) int {
4444
return res
4545
}
4646

47-
func GetFloat32WithDefault(key string, defaultValue float64) float64 {
47+
func GetFloat32WithDefault(key string, defaultValue float32) float32 {
4848

4949
value, exists := os.LookupEnv(key)
5050
if !exists {
@@ -58,7 +58,7 @@ func GetFloat32WithDefault(key string, defaultValue float64) float64 {
5858
return defaultValue
5959
}
6060

61-
return res
61+
return float32(res)
6262
}
6363

6464
func GetLogLevel() string { return GetWithDefault("LOG_LEVEL", "info") }

0 commit comments

Comments
 (0)