MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / getAPIKeyID

Function getAPIKeyID

cmd/ttn-lw-cli/commands/flags.go:129–140  ·  view source on GitHub ↗
(flagSet *pflag.FlagSet, args []string, i int)

Source from the content-addressed store, hash-verified

127)
128
129func getAPIKeyID(flagSet *pflag.FlagSet, args []string, i int) string {
130 var apiKeyID string
131 if len(args) > 0+i {
132 if len(args) > 1+i {
133 logger.Warn("Multiple API key IDs found in arguments, considering only the first")
134 }
135 apiKeyID = args[0+i]
136 } else {
137 apiKeyID, _ = flagSet.GetString("api-key-id")
138 }
139 return apiKeyID
140}
141
142var apiKeyExpiryFlag = func() *pflag.FlagSet {
143 flagSet := &pflag.FlagSet{}

Callers 4

gateways_access.goFile · 0.85
users_access.goFile · 0.85

Calls 1

WarnMethod · 0.65

Tested by

no test coverage detected