From 4684bbe535147f80898e1e657bcd3cd253c11ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sun, 15 Nov 2020 19:20:45 +0000 Subject: [PATCH] run a newer gofumpt, require Go 1.14 --- .github/workflows/test.yml | 2 +- README.md | 4 ++-- go.mod | 4 ++-- main.go | 2 +- main_test.go | 2 +- update.go | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5e685a..eb8d94f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.13.x, 1.14.x] + go-version: [1.14.x, 1.15.x] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: diff --git a/README.md b/README.md index a4764f3..f96be24 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![GoDoc](https://godoc.org/github.com/mvdan/fdroidcl?status.svg)](https://godoc.org/mvdan.cc/fdroidcl) -[F-Droid](https://f-droid.org/) desktop client. Requires Go 1.13 or later. +[F-Droid](https://f-droid.org/) desktop client. Requires Go 1.14 or later. - go get -u mvdan.cc/fdroidcl + go get mvdan.cc/fdroidcl While the Android client integrates with the system with regular update checks and notifications, this is a simple command line client that talks to connected diff --git a/go.mod b/go.mod index b893bd1..aaca21c 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module mvdan.cc/fdroidcl +go 1.14 + require ( github.com/kr/pretty v0.2.1 github.com/kr/text v0.2.0 // indirect github.com/rogpeppe/go-internal v1.6.2 gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect ) - -go 1.13 diff --git a/main.go b/main.go index 0361436..8730372 100644 --- a/main.go +++ b/main.go @@ -20,7 +20,7 @@ const version = "v0.5.0" func subdir(dir, name string) string { p := filepath.Join(dir, name) - if err := os.MkdirAll(p, 0755); err != nil { + if err := os.MkdirAll(p, 0o755); err != nil { fmt.Fprintf(os.Stderr, "Could not create dir '%s': %v\n", p, err) } return p diff --git a/main_test.go b/main_test.go index 03bd2fe..0c9838a 100644 --- a/main_test.go +++ b/main_test.go @@ -62,7 +62,7 @@ func TestScripts(t *testing.T) { Dir: filepath.Join("testdata", "scripts"), Setup: func(e *testscript.Env) error { home := e.WorkDir + "/home" - if err := os.MkdirAll(home, 0777); err != nil { + if err := os.MkdirAll(home, 0o777); err != nil { return err } e.Vars = append(e.Vars, "HOME="+home) diff --git a/update.go b/update.go index 9d79607..f94d02d 100644 --- a/update.go +++ b/update.go @@ -108,7 +108,7 @@ func downloadEtag(url, path string, sum []byte) error { fmt.Printf("not modified") return errNotModified } - f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) + f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o644) if err != nil { return err } @@ -131,7 +131,7 @@ func downloadEtag(url, path string, sum []byte) error { return err } } - if err := ioutil.WriteFile(etagPath, []byte(respEtag(resp)), 0644); err != nil { + if err := ioutil.WriteFile(etagPath, []byte(respEtag(resp)), 0o644); err != nil { return err } fmt.Printf("done")