ClickHouse/programs/diagnostics/internal/platform/test/env.go

17 lines
298 B
Go
Raw Normal View History

2022-04-27 12:22:20 +00:00
package test
import "os"
const defaultClickHouseVersion = "latest"
func GetClickHouseTestVersion() string {
return GetEnv("CLICKHOUSE_VERSION", defaultClickHouseVersion)
}
func GetEnv(key, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}
return fallback
}