launchpad.net/~rogpeppe/juju-core/500-errgo-fix@v0.0.0-20140213181702-000000002356/names/environ.go (about) 1 // Copyright 2013 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package names 5 6 import ( 7 "strings" 8 ) 9 10 // EnvironTag returns the tag of an environment with the given environment UUID. 11 func EnvironTag(uuid string) string { 12 return makeTag(EnvironTagKind, uuid) 13 } 14 15 // IsEnvironment returns whether id is a valid environment UUID. 16 func IsEnvironment(id string) bool { 17 // TODO(axw) 2013-12-04 #1257587 18 // We should not accept environment tags that 19 // do not look like UUIDs. 20 return !strings.Contains(id, "/") 21 }