Browse Source

run a newer gofumpt, require Go 1.14

pull/57/head
Daniel Martí 5 years ago
parent
commit
4684bbe535
  1. 2
      .github/workflows/test.yml
  2. 4
      README.md
  3. 4
      go.mod
  4. 2
      main.go
  5. 2
      main_test.go
  6. 4
      update.go

2
.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:

4
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

4
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

2
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

2
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)

4
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")

Loading…
Cancel
Save