func (c *Client) Publish(id *charm.URL, channels []params.Channel, resources map[string]int) error {
	if len(channels) == 0 {
		return nil
	}
	val := &params.PublishRequest{
		Resources: resources,
		Channels:  channels,
	}
	if err := c.Put("/"+id.Path()+"/publish", val); err != nil {
		return errgo.Mask(err, isAPIError)
	}
	return nil
}
// Publish tells the charmstore to mark the given charm as published with the
// given resource revisions to the given channels.
Publish tells the charmstore to mark the given charm as published with the
given resource revisions to the given channels.
// Publish tells the charmstore to mark the given charm as published with the // given resource revisions to the given channels .
func (c *Client) Publish(id *charm.URL, channels []params.Channel, resources map[string]int) error {
	if len(channels) == 0 {
		return nil
	}
	val := &params.PublishRequest{
		Resources: resources,
		Channels:  channels,
	}
	if err := c.Put("/"+id.Path()+"/publish", val); err != nil {
		return errgo.Mask(err, isAPIError)
	}
	return nil
}
func ( c * Client ) Publish ( id * charm . URL , channels [ ] params . Channel , resources map [ string ] int ) error { if len ( channels ) == 0 { return nil } val := & params . PublishRequest { Resources : resources , Channels : channels , } if err := c . Put ( " " + id . Path ( ) + " " , val ) ; err != nil { return errgo . Mask ( err , isAPIError ) } return nil }
Publish tells the charmstore to mark the given charm as published with the
given resource revisions to the given channels.
Publish tells the charmstore to mark the given charm as published with the given resource revisions to the given channels .