shared/version/version.go
func Parse(s string) (*DottedVersion, error) {
	r, _ := regexp.Compile(`^([0-9]+.[0-9]+(.[0-9]+))?.*`)
	matches := r.FindAllStringSubmatch(s, -1)
	if len(matches[0]) < 2 {
		return nil, fmt.Errorf("Can't parse a version")
	}
	return NewDottedVersion(matches[0][1])
}
func Parse(s string) (*DottedVersion, error) {
	r, _ := regexp.Compile(`^([0-9]+.[0-9]+(.[0-9]+))?.*`)
	matches := r.FindAllStringSubmatch(s, -1)
	if len(matches[0]) < 2 {
		return nil, fmt.Errorf("Can't parse a version")
	}
	return NewDottedVersion(matches[0][1])
}
// Parse parses a string starting with a dotted version and returns it.