Go: Fix comment in NewSemVer for empty string

This commit is contained in:
Michael B. Gale
2024-05-11 12:27:50 +01:00
parent 054efa648c
commit 898383ccff

View File

@@ -52,7 +52,7 @@ func Zero() SemVer {
// the empty string, this function return `nil`. Otherwise, for invalid version strings, the function
// prints a message to the log and exits the process.
func NewSemVer(version string) SemVer {
// If the input is the empty string, return nil f
// If the input is the empty string, return `nil` since we use `nil` to represent "no version".
if version == "" {
return nil
}