Skip to content

Commit f94dce3

Browse files
committed
main: Fix strings.Replace argument order
It's (string, old, new, n), not (old, new, string, n) [1]. Fixes a typo I'd introduced in cdd7165 (main: Return to using TRAVIS_COMMIT_RANGE (with ... -> .. fix), 2017-03-21, vbatts#17). [1]: https://golang.org/pkg/strings/#Replace Signed-off-by: W. Trevor King <wking@tremily.us>
1 parent 4cee76b commit f94dce3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func main() {
5151
if commitRange == "" {
5252
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && !*flNoTravis {
5353
if os.Getenv("TRAVIS_COMMIT_RANGE") != "" {
54-
commitRange = strings.Replace("...", "..", os.Getenv("TRAVIS_COMMIT_RANGE"), 1)
54+
commitRange = strings.Replace(os.Getenv("TRAVIS_COMMIT_RANGE"), "...", "..", 1)
5555
} else if os.Getenv("TRAVIS_COMMIT") != "" {
5656
commitRange = os.Getenv("TRAVIS_COMMIT")
5757
}

0 commit comments

Comments
 (0)