summaryrefslogtreecommitdiffstats
path: root/client/go/cmd/api_key.go
diff options
context:
space:
mode:
Diffstat (limited to 'client/go/cmd/api_key.go')
-rw-r--r--client/go/cmd/api_key.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/client/go/cmd/api_key.go b/client/go/cmd/api_key.go
index 41c6136a33c..032d98c96fe 100644
--- a/client/go/cmd/api_key.go
+++ b/client/go/cmd/api_key.go
@@ -36,9 +36,7 @@ var apiKeyCmd = &cobra.Command{
Example: apiKeyExample(),
DisableAutoGenTag: true,
Args: cobra.ExactArgs(0),
- Run: func(cmd *cobra.Command, args []string) {
- doApiKey()
- },
+ Run: doApiKey,
}
var deprecatedApiKeyCmd = &cobra.Command{
@@ -49,12 +47,10 @@ var deprecatedApiKeyCmd = &cobra.Command{
Args: cobra.ExactArgs(0),
Hidden: true,
Deprecated: "use 'vespa auth api-key' instead",
- Run: func(cmd *cobra.Command, args []string) {
- doApiKey()
- },
+ Run: doApiKey,
}
-func doApiKey() {
+func doApiKey(_ *cobra.Command, _ []string) {
cfg, err := LoadConfig()
if err != nil {
fatalErr(err, "Could not load config")