Add support for provisioning and rebuilding via interface
This commit is contained in:
parent
f5c5999f44
commit
ddb4bb3546
76 changed files with 1306 additions and 625 deletions
14
internal/wisski/ingredient/barrel/composer/name.go
Normal file
14
internal/wisski/ingredient/barrel/composer/name.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package composer
|
||||
|
||||
import "strings"
|
||||
|
||||
// ModuleName extracts the module name from a specification.
|
||||
// If the module name cannot be found, returns the string unchanged
|
||||
func ModuleName(spec string) string {
|
||||
_, name, found := strings.Cut(spec, "/")
|
||||
if !found {
|
||||
return spec
|
||||
}
|
||||
name, _, _ = strings.Cut(name, ":")
|
||||
return name
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue