// licencesNms should list all the licences from the service
licencesNms should list all the licences from the service
// licencesNms should list all the licences from the service
func licencesNms(ctx context.Context) error {
	resp, err := nmsService.List(ctx, avian.NmsListRequest{})
	if err != nil {
		return err
	}
	var headers table.Row
	var body []table.Row
	headers = table.Row{"ID", "Address", "Type", "Licences", "In-Use"}
	for _, s := range resp.Nms {
		for _, lic := range s.Licences {
			body = append(body, table.Row{lic.ID, s.Address, lic.Type, lic.Amount, lic.InUse})
		}
	}
	fmt.Println(pretty.Format(headers, body))
	return nil
}
func licencesNms ( ctx context . Context ) error { resp , err := nmsService . List ( ctx , avian . NmsListRequest { } ) if err != nil { return err } var headers table . Row var body [ ] table . Row headers = table . Row { " " , " " , " " , " " , " " } for _ , s := range resp . Nms { for _ , lic := range s . Licences { body = append ( body , table . Row { lic . ID , s . Address , lic . Type , lic . Amount , lic . InUse } ) } } fmt . Println ( pretty . Format ( headers , body ) ) return nil }
licencesNms should list all the licences from the service
licencesNms should list all the licences from the service