MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / WritablePath

Function WritablePath

internal/util/util.go:118–128  ·  view source on GitHub ↗

WritablePath returns the cleaned WRITABLE_PATH environment variable when it is set. It accepts both uppercase and lowercase variants for compatibility with existing conventions.

()

Source from the content-addressed store, hash-verified

116// WritablePath returns the cleaned WRITABLE_PATH environment variable when it is set.
117// It accepts both uppercase and lowercase variants for compatibility with existing conventions.
118func WritablePath() string {
119 for _, key := range []string{"WRITABLE_PATH", "writable_path"} {
120 if value, ok := os.LookupEnv(key); ok {
121 trimmed := strings.TrimSpace(value)
122 if trimmed != "" {
123 return filepath.Clean(trimmed)
124 }
125 }
126 }
127 return ""
128}

Callers 3

ResolveLogDirectoryFunction · 0.92
StaticDirFunction · 0.92
mainFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected