I am trying to port a Dagger module from Go to Dang, and it calls the golang.org/x/mod/semver package to check if a version string is valid semver. Relevant snippet:
version := strings.TrimPrefix(tag, "sdk/typescript/")
versionFlag := strings.TrimPrefix(version, "v")
if !semver.IsValid(version) {
versionFlag = "prepatch"
}
If Dang had a semver builtin, I could port this code without hacky workarounds like building & executing a semver-parsing CLI tool.
I am trying to port a Dagger module from Go to Dang, and it calls the golang.org/x/mod/semver package to check if a version string is valid semver. Relevant snippet:
If Dang had a semver builtin, I could port this code without hacky workarounds like building & executing a semver-parsing CLI tool.