-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
Hello,
I can't figure out how to setup a credentials file. I'm a complete go newbie. This is my main.go
:
package main
import (
"github.com/danielgtaylor/openapi-cli-generator/cli"
"github.com/danielgtaylor/openapi-cli-generator/apikey"
)
func main() {
cli.Init(&cli.Config{
AppName: "example",
EnvPrefix: "EXAMPLE",
Version: "1.0.0",
})
exampleRegister(false)
apikey.Init("Authorization", apikey.LocationHeader)
cli.Creds.Set("profiles.default.api_key", "mykey")
cli.Root.Execute()
}
This works, but the api key is hardcorded. Where and how should I define the key in the credentials file? I've tried:
./.example/config.json
:
{ "example":
{ "profiles":
{ "default":
{ "api_key": "mykey"
}
}
}
}
Any help is appreciated!
Metadata
Metadata
Assignees
Labels
No labels