MCPcopy Create free account
hub / github.com/danielmiessler/Fabric / apiKeyPassedAsArg

Function apiKeyPassedAsArg

internal/cli/setup_server.go:61–68  ·  view source on GitHub ↗

apiKeyPassedAsArg reports whether the REST API key is on the command line, not in the FABRIC_API_KEY environment variable or the .env file.

(args []string)

Source from the content-addressed store, hash-verified

59// apiKeyPassedAsArg reports whether the REST API key is on the command line,
60// not in the FABRIC_API_KEY environment variable or the .env file.
61func apiKeyPassedAsArg(args []string) bool {
62 for _, a := range args {
63 if a == "--api-key" || strings.HasPrefix(a, "--api-key=") {
64 return true
65 }
66 }
67 return false
68}

Callers 2

TestAPIKeyPassedAsArgFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestAPIKeyPassedAsArgFunction · 0.68