7 // ProviderInstance describes a particular provider instance by its full name,
8 // like "null" or "aws.foo".
9 type ProviderInstance string
11 // Type returns the provider type of this instance. For example, for an instance
12 // named "aws.foo" the type is "aws".
13 func (p ProviderInstance) Type() string {
15 if dotPos := strings.Index(t, "."); dotPos != -1 {
21 // Alias returns the alias of this provider, if any. An instance named "aws.foo"
22 // has the alias "foo", while an instance named just "docker" has no alias,
23 // so the empty string would be returned.
24 func (p ProviderInstance) Alias() string {
26 if dotPos := strings.Index(t, "."); dotPos != -1 {