From: Muhammad Falak R Wani Date: Mon, 7 Aug 2023 13:43:52 +0000 (+0000) Subject: strings: use the builtin max function X-Git-Tag: go1.22rc1~1380 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=78af0bbc65a06461e05318619acdaf35b630632a;p=gostls13.git strings: use the builtin max function Change-Id: I9093c0ce822f0620152a7b911321c57bc50dc90b GitHub-Last-Rev: dc6be231b315262e13925814b16786618ef5dad4 GitHub-Pull-Request: golang/go#61807 Reviewed-on: https://go-review.googlesource.com/c/go/+/516615 Run-TryBot: Keith Randall TryBot-Result: Gopher Robot Reviewed-by: Keith Randall Auto-Submit: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Michael Knyszek --- diff --git a/src/strings/search.go b/src/strings/search.go index e5bffbbfe8..e1ace3e795 100644 --- a/src/strings/search.go +++ b/src/strings/search.go @@ -115,10 +115,3 @@ func (f *stringFinder) next(text string) int { } return -1 } - -func max(a, b int) int { - if a > b { - return a - } - return b -}