VOL-1978 - add golangci invocation and fixed issues it highlighted
Change-Id: I86f438f84e8ab7fae499a163d599b699c472afda
diff --git a/internal/pkg/commands/devices.go b/internal/pkg/commands/devices.go
index 9f836b4..78d1aca 100644
--- a/internal/pkg/commands/devices.go
+++ b/internal/pkg/commands/devices.go
@@ -23,6 +23,7 @@
"github.com/jhump/protoreflect/dynamic"
"github.com/opencord/voltctl/pkg/format"
"github.com/opencord/voltctl/pkg/model"
+ "log"
"strings"
)
@@ -113,7 +114,9 @@
var deviceOpts = DeviceOpts{}
func RegisterDeviceCommands(parser *flags.Parser) {
- parser.AddCommand("device", "device commands", "Commands to query and manipulate VOLTHA devices", &deviceOpts)
+ if _, err := parser.AddCommand("device", "device commands", "Commands to query and manipulate VOLTHA devices", &deviceOpts); err != nil {
+ log.Fatalf("Unexpected error while attempting to register device commands : %s", err)
+ }
}
func (i *DeviceId) Complete(match string) []flags.Completion {