(modPath string)
| 236 | } |
| 237 | |
| 238 | func 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 | |
| 246 | func getLatestVersion(modName string) (string, error) { |
| 247 | cmd := exec.Command("git", "tag", "-l", modName+"/v*", "--sort=-v:refname") |
no test coverage detected