add Module method for module name only

pull/16722/head
James Bardin 9 years ago
parent 92db96f783
commit 87f23d9719

@ -184,3 +184,9 @@ func (m *Module) formatWithPrefix(hostPrefix string, preserveCase bool) string {
}
return str
}
// Module returns just the registry ID of the module, without a hostname or
// suffix.
func (m *Module) Module() string {
return fmt.Sprintf("%s/%s/%s", m.RawNamespace, m.RawName, m.RawProvider)
}

Loading…
Cancel
Save