/*
GetAvailableQueues returns a list of available queues from the API.
*/
GetAvailableQueues returns a list of available queues from the API.
/ * GetAvailableQueues returns a list of available queues from the API . * /
func GetAvailableQueues() ([]string, error) {
	client := &http.Client{}
	res, err := client.Get(Host + "/queues")
	if err != nil {
		return nil, err
	}
	respBody := res.Body
	defer respBody.Close()
	availableQueues := struct {
		Queues []string `json:"queues"`
	}{}
	if err := json.NewDecoder(respBody).Decode(&availableQueues); err != nil {
		return nil, err
	}
	return availableQueues.Queues, nil
}
func GetAvailableQueues ( ) ( [ ] string , error ) { client := & http . Client { } res , err := client . Get ( Host + " " ) if err != nil { return nil , err } respBody := res . Body defer respBody . Close ( ) availableQueues := struct { Queues [ ] string `json:"queues"` } { } if err := json . NewDecoder ( respBody ) . Decode ( & availableQueues ) ; err != nil { return nil , err } return availableQueues . Queues , nil }
GetAvailableQueues returns a list of available queues from the API.
GetAvailableQueues returns a list of available queues from the API .