aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2021-12-02 10:33:04 +0100
committerBjørn Christian Seime <bjorncs@verizonmedia.com>2021-12-02 10:33:04 +0100
commitf33d88f96fbca58d065ed0437a6a81f27253caa8 (patch)
treeb736b70157ac74f465486a61c775406abb94d5d7 /client
parentd7e097a6405da03ac89bc162f252751340146d0a (diff)
Simplify
Diffstat (limited to 'client')
-rw-r--r--client/go/cmd/api_key.go10
-rw-r--r--client/go/cmd/cert.go10
2 files changed, 6 insertions, 14 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")
diff --git a/client/go/cmd/cert.go b/client/go/cmd/cert.go
index ff88d614682..e79a45d3af8 100644
--- a/client/go/cmd/cert.go
+++ b/client/go/cmd/cert.go
@@ -33,9 +33,7 @@ var certCmd = &cobra.Command{
Example: certExample(),
DisableAutoGenTag: true,
Args: cobra.MaximumNArgs(1),
- Run: func(cmd *cobra.Command, args []string) {
- doCert(args)
- },
+ Run: doCert,
}
var deprecatedCertCmd = &cobra.Command{
@@ -46,12 +44,10 @@ var deprecatedCertCmd = &cobra.Command{
Args: cobra.MaximumNArgs(1),
Deprecated: "use 'vespa auth cert' instead",
Hidden: true,
- Run: func(cmd *cobra.Command, args []string) {
- doCert(args)
- },
+ Run: doCert,
}
-func doCert(args []string) {
+func doCert(_ *cobra.Command, args []string) {
app := getApplication()
pkg, err := vespa.FindApplicationPackage(applicationSource(args), false)
if err != nil {