diff --git a/.travis.yml b/.travis.yml index 01fa5661..43cd4603 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,21 +24,21 @@ install: 'make deps' matrix: fast_finish: false allow_failures: - - go: 1.12.x + - go: 1.13.x - go: tip - os: osx # include only one build for osx for a quicker build as the nr. of these runners are sparse include: - name: "basic tests" - go: 1.11.x + go: 1.12.x env: TEST_BLOCK=basic - name: "shell tests" - go: 1.11.x + go: 1.12.x env: TEST_BLOCK=shell - name: "race tests" - go: 1.11.x + go: 1.12.x env: TEST_BLOCK=race - - go: 1.12.x + - go: 1.13.x - go: tip - os: osx script: 'TEST_BLOCK="$TEST_BLOCK" make test' diff --git a/docker/Dockerfile b/docker/Dockerfile index 469f57be..70a0c3da 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,10 +1,10 @@ -FROM golang:1.9 +FROM golang:1.12 MAINTAINER Michał Czeraszkiewicz # Set the reset cache variable # Read more here: http://czerasz.com/2014/11/13/docker-tip-and-tricks/#use-refreshedat-variable-for-better-cache-control -ENV REFRESHED_AT 2017-11-16 +ENV REFRESHED_AT 2020-09-23 # Update the package list to be able to use required packages RUN apt-get update diff --git a/docker/Dockerfile.development b/docker/Dockerfile.development index 28937b04..20c7daf3 100644 --- a/docker/Dockerfile.development +++ b/docker/Dockerfile.development @@ -1,4 +1,4 @@ -FROM golang:1.11 +FROM golang:1.12 MAINTAINER Michał Czeraszkiewicz diff --git a/docs/development.md b/docs/development.md index 696e7426..8e70d6ae 100644 --- a/docs/development.md +++ b/docs/development.md @@ -28,7 +28,7 @@ required for running the _test_ suite. ### Build -* `golang` 1.11 or higher (required, available in some distros and distributed +* `golang` 1.12 or higher (required, available in some distros and distributed as a binary officially by [golang.org](https://golang.org/dl/)) ### Runtime diff --git a/docs/quick-start-guide.md b/docs/quick-start-guide.md index 721fc050..0dbddab0 100644 --- a/docs/quick-start-guide.md +++ b/docs/quick-start-guide.md @@ -37,7 +37,7 @@ You'll need some dependencies, including `golang`, and some associated tools. #### Installing golang -* You need golang version 1.11 or greater installed. +* You need golang version 1.12 or greater installed. * To install on rpm style systems: `sudo dnf install golang` * To install on apt style systems: `sudo apt install golang` * To install on macOS systems install [Homebrew](https://brew.sh) diff --git a/engine/util/mode.go b/engine/util/mode.go index 025d559b..269af32d 100644 --- a/engine/util/mode.go +++ b/engine/util/mode.go @@ -43,7 +43,7 @@ const ( // false if not. func modeIsValidWho(who string) bool { for _, w := range []string{"u", "g", "o"} { - who = strings.Replace(who, w, "", -1) // TODO: use ReplaceAll in 1.12 + who = strings.ReplaceAll(who, w, "") } return len(who) == 0 } @@ -52,7 +52,7 @@ func modeIsValidWho(who string) bool { // string ('r', 'w', 'x', 's', 't'). func modeIsValidWhat(what string) bool { for _, w := range []string{"r", "w", "x", "s", "t"} { - what = strings.Replace(what, w, "", -1) // TODO: use ReplaceAll in 1.12 + what = strings.ReplaceAll(what, w, "") } return len(what) == 0 } diff --git a/engine/util/util.go b/engine/util/util.go index ce3a7ba6..ed93c32c 100644 --- a/engine/util/util.go +++ b/engine/util/util.go @@ -70,9 +70,9 @@ func ResPathUID(res engine.Res) string { // a name of: /tmp/mgmt/foo is /tmp-mgmt-foo and // a name of: /tmp/mgmt-foo -> /tmp-mgmt-foo if we replace slashes. // As a result, we base64 encode (but without slashes). - name := strings.Replace(res.Name(), "/", "-", -1) // TODO: use ReplaceAll in 1.12 - if os.PathSeparator != '/' { // lol windows? - name = strings.Replace(name, string(os.PathSeparator), "-", -1) // TODO: use ReplaceAll in 1.12 + name := strings.ReplaceAll(res.Name(), "/", "-") + if os.PathSeparator != '/' { // lol windows? + name = strings.ReplaceAll(name, string(os.PathSeparator), "-") } b := []byte(res.Name()) encoded := base64.URLEncoding.EncodeToString(b)