You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
425 B
23 lines
425 B
2 years ago
|
package goenv
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestGetEnvDefault(t *testing.T) {
|
||
|
t.Log(GetEnvDefault("test1", "1"))
|
||
|
}
|
||
|
func TestGetEnvDefaultInt(t *testing.T) {
|
||
|
t.Log(GetEnvDefaultInt("test2", 2))
|
||
|
}
|
||
|
|
||
|
func BenchmarkGetEnvDefault(b *testing.B) {
|
||
|
for i := 0; i < b.N; i++ {
|
||
|
b.Log(GetEnvDefault("test1", "1"))
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func BenchmarkGetEnvDefaultInt(b *testing.B) {
|
||
|
for i := 0; i < b.N; i++ {
|
||
|
b.Log(GetEnvDefaultInt("test2", 2))
|
||
|
}
|
||
|
}
|