From the spec, "Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty."
(m string)
| 762 | // following the patch or pre-release version. Identifiers MUST comprise only |
| 763 | // ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty." |
| 764 | func validateMetadata(m string) error { |
| 765 | eparts := strings.Split(m, ".") |
| 766 | for _, p := range eparts { |
| 767 | if p == "" { |
| 768 | return ErrInvalidMetadata |
| 769 | } else if !containsOnly(p, allowed) { |
| 770 | return ErrInvalidMetadata |
| 771 | } |
| 772 | } |
| 773 | return nil |
| 774 | } |
| 775 | |
| 776 | // validateVersion checks for common validation issues but may not catch all errors |
| 777 | func validateVersion(m []string) error { |
searching dependent graphs…