Skip to content

Commit 0e6fdab

Browse files
committed
rename GetEnv to Getenv & deprecate old
1 parent 0d0bcbf commit 0e6fdab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

snowflake.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,14 @@ func MustParse(str string) ID {
4343

4444
// GetEnv returns the value of the environment variable named by the key and parses it as a snowflake.
4545
// returns ID(0) if the environment variable is not set.
46+
// Deprecated: use Getenv instead.
4647
func GetEnv(key string) ID {
48+
return Getenv(key)
49+
}
50+
51+
// Getenv returns the value of the environment variable named by the key and parses it as a snowflake.
52+
// returns ID(0) if the environment variable is not set.
53+
func Getenv(key string) ID {
4754
snowflake, _ := LookupEnv(key)
4855
return snowflake
4956
}

0 commit comments

Comments
 (0)