Skip to content

Commit 09dc953

Browse files
todaymoondenyeart
authored andcommitted
refactor: use the built-in max/min to simplify the code
Signed-off-by: todaymoon <[email protected]>
1 parent 293c717 commit 09dc953

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

lib/metadata/version.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,6 @@ func strs(version string) []string {
134134
return strings.Split(strings.Split(version, "-")[0], ".")
135135
}
136136

137-
func max(a, b int) int {
138-
if a > b {
139-
return a
140-
}
141-
return b
142-
}
143-
144137
func val(strs []string, i int) (int, error) {
145138
if i >= len(strs) {
146139
return 0, nil

0 commit comments

Comments
 (0)