you probably want to do something like this (or move it to a separate function maybe)
if args.ListImages if args.Device == "" { log.Fatal("You must specify a device type") }
deviceChannel, err := channels.GetDeviceChannel( args.Server, args.Channel, args.Device) if err != nil { log.Fatal(err) }
return deviceChannel.ListImageVersions() }
and keep the original deviceChannel setup that in it's original location to avoid the from below to not break current "device" autodetection
« Back to merge proposal
you probably want to do something like this (or move it to a separate function maybe)
if args.ListImages
if args.Device == "" {
log.Fatal("You must specify a device type")
}
deviceChannel, err := channels. GetDeviceChanne l(
args.Server, args.Channel, args.Device)
if err != nil {
log.Fatal(err)
}
return deviceChannel. ListImageVersio ns()
}
and keep the original deviceChannel setup that in it's original location to avoid the from below to not break current "device" autodetection