IsValidTag returns true if the given string is a valid tag
(tagVersion string)
| 130 | |
| 131 | // IsValidTag returns true if the given string is a valid tag |
| 132 | func IsValidTag(tagVersion string) (bool, error) { |
| 133 | if tagVersion[0] == 'v' { |
| 134 | tagVersion = tagVersion[1:] |
| 135 | } |
| 136 | tags, err := GetVersionTags() |
| 137 | if err != nil { |
| 138 | return false, err |
| 139 | } |
| 140 | |
| 141 | for _, tag := range tags { |
| 142 | if tag.String() == tagVersion { |
| 143 | return true, nil |
| 144 | } |
| 145 | } |
| 146 | return false, nil |
| 147 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…