MCPcopy Create free account
hub / github.com/entireio/git-sync / envOr

Function envOr

cmd/git-sync/flags.go:95–101  ·  view source on GitHub ↗
(key, fallback string)

Source from the content-addressed store, hash-verified

93}
94
95func envOr(key, fallback string) string {
96 value := os.Getenv(key)
97 if value == "" {
98 return fallback
99 }
100 return value
101}
102
103func envBool(key string) bool {
104 value := strings.TrimSpace(strings.ToLower(os.Getenv(key)))

Callers 4

addSourceAuthFunction · 0.85
addTargetAuthFunction · 0.85
newProtocolFlagFunction · 0.85
newConvertSHA256CmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected