File tree Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Expand file tree Collapse file tree 6 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 8
8
"github.com/spf13/cobra"
9
9
)
10
10
11
- // Commands hold a slice of all cobra commands for cli tool
12
- var Commands []* cobra.Command
11
+ // commands hold a slice of all cobra commands for cli tool
12
+ var commands []* cobra.Command
13
13
14
14
// RootCmd is the main entrypoint for the cli
15
15
func RootCmd () * cobra.Command {
@@ -25,7 +25,7 @@ func RootCmd() *cobra.Command {
25
25
},
26
26
}
27
27
28
- for _ , cmd := range Commands {
28
+ for _ , cmd := range commands {
29
29
c .AddCommand (cmd )
30
30
}
31
31
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import (
19
19
20
20
//nolint:gochecknoinits
21
21
func init () {
22
- Commands = append (Commands , Daemon ())
22
+ commands = append (commands , Daemon ())
23
23
}
24
24
25
25
// Daemon returns the daemon command
@@ -37,7 +37,7 @@ func Daemon() *cobra.Command {
37
37
cmd := & cobra.Command {
38
38
Use : "daemon" ,
39
39
Short : "Run the daemon command" ,
40
- RunE : func (c * cobra.Command , _ []string ) error {
40
+ RunE : func (_ * cobra.Command , _ []string ) error {
41
41
arrayChecker := []string {devicePrivateKey , deviceEndEntityCert , bootstrapTrustAnchorCert }
42
42
if bootstrapURL != "" && dhcpLeaseFile != "" {
43
43
return fmt .Errorf ("'--bootstrap-url' and '--dhcp-lease-file' are mutualy exclusive" )
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
15
15
16
16
//nolint:gochecknoinits
17
17
func init () {
18
- Commands = append (Commands , Disable ())
18
+ commands = append (commands , Disable ())
19
19
}
20
20
21
21
// Disable returns the disable command
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
15
15
16
16
//nolint:gochecknoinits
17
17
func init () {
18
- Commands = append (Commands , Enable ())
18
+ commands = append (commands , Enable ())
19
19
}
20
20
21
21
// Enable returns the enable command
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
15
15
16
16
//nolint:gochecknoinits
17
17
func init () {
18
- Commands = append (Commands , Run ())
18
+ commands = append (commands , Run ())
19
19
}
20
20
21
21
// Run returns the run command
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import (
15
15
16
16
//nolint:gochecknoinits
17
17
func init () {
18
- Commands = append (Commands , Status ())
18
+ commands = append (commands , Status ())
19
19
}
20
20
21
21
// Status returns the status command
You can’t perform that action at this time.
0 commit comments