mirror of
https://github.com/tiennm99/keepalive.git
synced 2026-10-11 03:13:31 +00:00
Consolidates the *-keepalive family (redis, valkey, postgresql, mysql, mongodb, couchbase) into a single binary with a runtime DB_TYPE dispatch and an Adapter interface. Original repos archived with a pointer here.
15 lines
220 B
Go
15 lines
220 B
Go
package adapter
|
|
|
|
import "os"
|
|
|
|
func lookupEnv(name string) (string, bool) {
|
|
return os.LookupEnv(name)
|
|
}
|
|
|
|
func envOr(name, def string) string {
|
|
if v, ok := os.LookupEnv(name); ok && v != "" {
|
|
return v
|
|
}
|
|
return def
|
|
}
|