func (c *Client) SearchService(i *SearchServiceInput) (*Service, error) {
	if i.Name == "" {
		return nil, ErrMissingName
	}

	resp, err := c.Get("/service/search", &RequestOptions{
		Params: map[string]string{
			"name": i.Name,
		},
	})
	if err != nil {
		return nil, err
	}

	var s *Service
	if err := decodeBodyMap(resp.Body, &s); err != nil {
		return nil, err
	}

	return s, nil
}
// SearchService gets a specific service by name. If no service exists by that
// name, the API returns a 400 response (not a 404).
SearchService gets a specific service by name. If no service exists by that
name, the API returns a 400 response (not a 404).
// SearchService gets a specific service by name . If no service exists by that // name the API returns a 400 response ( not a 404 ) .
func (c *Client) SearchService(i *SearchServiceInput) (*Service, error) {
	if i.Name == "" {
		return nil, ErrMissingName
	}
	resp, err := c.Get("/service/search", &RequestOptions{
		Params: map[string]string{
			"name": i.Name,
		},
	})
	if err != nil {
		return nil, err
	}
	var s *Service
	if err := decodeBodyMap(resp.Body, &s); err != nil {
		return nil, err
	}
	return s, nil
}
func ( c * Client ) SearchService ( i * SearchServiceInput ) ( * Service , error ) { if i . Name == " " { return nil , ErrMissingName } resp , err := c . Get ( " " , & RequestOptions { Params : map [ string ] string { " " : i . Name , } , } ) if err != nil { return nil , err } var s * Service if err := decodeBodyMap ( resp . Body , & s ) ; err != nil { return nil , err } return s , nil }
SearchService gets a specific service by name.
SearchService gets a specific service by name .