INNER CODE UNIT · Go

split

runmedev/runme · tools/release-notes/main.go:225

func split(sep, orig string) map[string]string {
	parts := strings.Split(orig, sep)
	res := make(map[string]string, len(parts))
	for i, v := range parts {
		res["_"+strconv.Itoa(i)] = v
	}
	return res
}

func isPrerelease(tag string) bool {
	re := regexp.MustCompile(`^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$`)
	return re.MatchString(strings.TrimLeft(tag, "v"))
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…