MCPcopy Create free account
hub / github.com/docker/secrets-engine / getModBase

Function getModBase

x/release/command.go:238–244  ·  view source on GitHub ↗
(modPath string)

Source from the content-addressed store, hash-verified

236}
237
238func getModBase(modPath string) (string, error) {
239 parts := strings.SplitN(modPath, "/", 4)
240 if len(parts) != 4 {
241 return "", fmt.Errorf("unexpected module format: %s", modPath)
242 }
243 return strings.Join(parts[:3], "/"), nil
244}
245
246func getLatestVersion(modName string) (string, error) {
247 cmd := exec.Command("git", "tag", "-l", modName+"/v*", "--sort=-v:refname")

Callers 2

BumpModInFileMethod · 0.85

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected