Skip to content

Commit

Permalink
Remove redundant min/max functions
Browse files Browse the repository at this point in the history
Go v1.21 adds built-in generic min and max functions. This removes the
need to maintain our own versions for the time.Duration types.
  • Loading branch information
rquitales committed Oct 4, 2024
1 parent 096b846 commit 06a0c0a
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions operator/internal/controller/pulumi/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,6 @@ limitations under the License.

package pulumi

import (
"time"
)

func min(a, b time.Duration) time.Duration {
if a < b {
return a
}
return b
}

func max(a, b time.Duration) time.Duration {
if a > b {
return a
}
return b
}

func exactlyOneOf(these ...bool) bool {
var found bool
for _, b := range these {
Expand Down

0 comments on commit 06a0c0a

Please sign in to comment.