Skip to content

Commit

Permalink
Use the min builtin function
Browse files Browse the repository at this point in the history
golang 1.21.0 introduced a 'min' builtin function
https://pkg.go.dev/[email protected]#min so we don't have to implement it
ourselves. Also golint-1.62 complains if we are not using the builtin
'min'.
  • Loading branch information
praveenkumar committed Nov 25, 2024
1 parent 504c055 commit 8d3928b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions pkg/crc/cluster/clusteroperator.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@ func joinWithLimit(names []string, maxNames int) string {
return ret
}

func min(a, b int) int {
if a > b {
return b
}
return a
}

func (status *Status) IsReady() bool {
return status.Available && !status.Progressing && !status.Degraded && !status.Disabled
}
Expand Down
7 changes: 0 additions & 7 deletions pkg/extract/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ func uncompress(ctx context.Context, tarball, targetDir string, fileFilter func(
}
}

func min(a int64, b int64) int64 {
if a < b {
return a
}
return b
}

func untar(ctx context.Context, reader io.Reader, targetDir string, fileFilter func(string) bool, showProgress bool) ([]string, error) {
var extractedFiles []string
tarReader := tar.NewReader(reader)
Expand Down

0 comments on commit 8d3928b

Please sign in to comment.