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

Function envValueRequired

internal/pluginstore/auth.go:249–259  ·  view source on GitHub ↗
(envName string, field string)

Source from the content-addressed store, hash-verified

247}
248
249func envValueRequired(envName string, field string) (string, error) {
250 envName = strings.TrimSpace(envName)
251 if envName == "" {
252 return "", fmt.Errorf("plugin store auth missing %s", field)
253 }
254 value := strings.TrimSpace(os.Getenv(envName))
255 if value == "" {
256 return "", fmt.Errorf("plugin store auth env %s is empty", envName)
257 }
258 return value, nil
259}

Callers 1

applyPluginStoreAuthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected