~themue/juju-core/050-prepare-openstack

« back to all changes in this revision

Viewing changes to state/relationunit.go

  • Committer: Dimiter Naydenov
  • Date: 2013-07-29 15:15:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1565.
  • Revision ID: dimiter.naydenov@canonical.com-20130729151541-zm8murwo9u7mtsdu
names: new package

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
        "launchpad.net/juju-core/charm"
15
15
        errors "launchpad.net/juju-core/errors"
 
16
        "launchpad.net/juju-core/names"
16
17
        "launchpad.net/juju-core/utils"
17
18
)
18
19
 
331
332
// of the lifetime of the unit.
332
333
func (ru *RelationUnit) ReadSettings(uname string) (m map[string]interface{}, err error) {
333
334
        defer utils.ErrorContextf(&err, "cannot read settings for unit %q in relation %q", uname, ru.relation)
334
 
        if !IsUnitName(uname) {
 
335
        if !names.IsUnitName(uname) {
335
336
                return nil, fmt.Errorf("%q is not a valid unit name", uname)
336
337
        }
337
338
        key, err := ru.key(uname)