mirror of
https://github.com/vbatts/git-validation.git
synced 2024-12-01 20:45:42 +00:00
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, #17).
[1]: https://golang.org/pkg/strings/#Replace
Signed-off-by: W. Trevor King <wking@tremily.us>
This commit is contained in:
parent
4cee76b1df
commit
f94dce37d6
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -51,7 +51,7 @@ func main() {
|
||||||
if commitRange == "" {
|
if commitRange == "" {
|
||||||
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && !*flNoTravis {
|
if strings.ToLower(os.Getenv("TRAVIS")) == "true" && !*flNoTravis {
|
||||||
if os.Getenv("TRAVIS_COMMIT_RANGE") != "" {
|
if os.Getenv("TRAVIS_COMMIT_RANGE") != "" {
|
||||||
commitRange = strings.Replace("...", "..", os.Getenv("TRAVIS_COMMIT_RANGE"), 1)
|
commitRange = strings.Replace(os.Getenv("TRAVIS_COMMIT_RANGE"), "...", "..", 1)
|
||||||
} else if os.Getenv("TRAVIS_COMMIT") != "" {
|
} else if os.Getenv("TRAVIS_COMMIT") != "" {
|
||||||
commitRange = os.Getenv("TRAVIS_COMMIT")
|
commitRange = os.Getenv("TRAVIS_COMMIT")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue