func (c Client) ResourceInfo(req ResourceRequest) (resource.Resource, error) {
	if err := c.jar.Activate(req.Charm); err != nil {
		return resource.Resource{}, errors.Trace(err)
	}
	defer func() { _ = c.jar.Deactivate() }()
	meta, err := c.csWrapper.ResourceMeta(req.Channel, req.Charm, req.Name, req.Revision)
	if err != nil {
		return resource.Resource{}, errors.Trace(err)
	}
	res, err := csparams.API2Resource(meta)
	if err != nil {
		return resource.Resource{}, errors.Trace(err)
	}
	return res, nil
}
// ResourceInfo returns the metadata for the given resource from the charmstore.
ResourceInfo returns the metadata for the given resource from the charmstore.
// ResourceInfo returns the metadata for the given resource from the charmstore .
func (c Client) ResourceInfo(req ResourceRequest) (resource.Resource, error) {
	if err := c.jar.Activate(req.Charm); err != nil {
		return resource.Resource{}, errors.Trace(err)
	}
	defer func() { _ = c.jar.Deactivate() }()
	meta, err := c.csWrapper.ResourceMeta(req.Channel, req.Charm, req.Name, req.Revision)
	if err != nil {
		return resource.Resource{}, errors.Trace(err)
	}
	res, err := csparams.API2Resource(meta)
	if err != nil {
		return resource.Resource{}, errors.Trace(err)
	}
	return res, nil
}
func ( c Client ) ResourceInfo ( req ResourceRequest ) ( resource . Resource , error ) { if err := c . jar . Activate ( req . Charm ) ; err != nil { return resource . Resource { } , errors . Trace ( err ) } defer func ( ) { _ = c . jar . Deactivate ( ) } ( ) meta , err := c . csWrapper . ResourceMeta ( req . Channel , req . Charm , req . Name , req . Revision ) if err != nil { return resource . Resource { } , errors . Trace ( err ) } res , err := csparams . API2Resource ( meta ) if err != nil { return resource . Resource { } , errors . Trace ( err ) } return res , nil }
ResourceInfo returns the metadata for the given resource from the charmstore.
ResourceInfo returns the metadata for the given resource from the charmstore .