~themue/juju-core/053-env-more-script-friendly

« back to all changes in this revision

Viewing changes to cmd/juju/destroyunit.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:
6
6
import (
7
7
        "errors"
8
8
        "fmt"
 
9
 
9
10
        "launchpad.net/juju-core/cmd"
10
11
        "launchpad.net/juju-core/juju"
11
 
        "launchpad.net/juju-core/state"
 
12
        "launchpad.net/juju-core/names"
12
13
        "launchpad.net/juju-core/state/api/params"
13
14
        "launchpad.net/juju-core/state/statecmd"
14
15
)
34
35
                return errors.New("no units specified")
35
36
        }
36
37
        for _, name := range c.UnitNames {
37
 
                if !state.IsUnitName(name) {
 
38
                if !names.IsUnitName(name) {
38
39
                        return fmt.Errorf("invalid unit name %q", name)
39
40
                }
40
41
        }