Code review comment for lp:~jamesodhunt/goget-ubuntu-touch/add-list-images-option

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

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

review: Needs Fixing

« Back to merge proposal