Skip to content

Commit 1a850ee

Browse files
authored
Update Android versions and deps, Go 1.18 support (#5)
1 parent efe478f commit 1a850ee

File tree

12 files changed

+304
-223
lines changed

12 files changed

+304
-223
lines changed

.circleci/config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
version: 2
2+
23
jobs:
34
test:
45
docker:
5-
- image: circleci/golang:1.13
6-
working_directory: /go/src/github.com/opengapps/package-api
6+
- image: cimg/go:1.19
77
steps:
88
- checkout
99
- restore_cache:
@@ -20,8 +20,7 @@ jobs:
2020
- /go/pkg/mod/cache/download/
2121
lint:
2222
docker:
23-
- image: golangci/golangci-lint:v1.23
24-
working_directory: /go/src/github.com/opengapps/package-api
23+
- image: golangci/golangci-lint:v1.49
2524
steps:
2625
- checkout
2726
- restore_cache:
@@ -32,6 +31,7 @@ jobs:
3231
- run:
3332
name: Lint
3433
command: make lint
34+
3535
workflows:
3636
version: 2
3737
test_and_lint:

.golangci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@ linters:
3232
- revive
3333
- govet
3434
- errcheck
35-
- deadcode
36-
- structcheck
37-
- varcheck
3835
- ineffassign
3936
- typecheck
4037
- dupl
4138
- goconst
4239
- gosec
43-
- staticcheck # (ex-megacheck)
44-
# - goimports - IDE should do this automatically as 'On save' action
40+
# - staticcheck # not for 1.18
4541

4642
issues:
4743
exclude-use-default: false
@@ -53,7 +49,7 @@ issues:
5349
# can be removed in the development phase
5450
# - (comment on exported (method|function|type|const)|should have( a package)? comment|comment should be of the form)
5551
# not for the active development - can be removed in the stable phase
56-
- should have a package comment, unless it's in another file for this package
52+
- "package-comments: should have a package comment"
5753
# - don't use an underscore in package name
5854
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
5955
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv|.*Rollback). is not checked

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ APP_VERSION?=$(if $(GIT_TAG),$(GIT_TAG),$(shell git describe --all --long HEAD 2
77
GO_VERSION:=$(shell go version)
88
GO_VERSION_SHORT:=$(shell echo $(GO_VERSION)|sed -E 's/.* go(.*) .*/\1/g')
99

10-
export GO111MODULE=on
1110
export GOPROXY=https://proxy.golang.org
1211
BUILD_ENVPARMS:=CGO_ENABLED=0
1312
BUILD_TS:=$(shell date +%FT%T%z)
@@ -60,4 +59,4 @@ run:
6059

6160
.PHONY: lint
6261
lint:
63-
golangci-lint run --config=.golangci.yml ./...
62+
golangci-lint run --config=.golangci.yml --timeout=5m ./...

go.mod

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,47 @@
11
module github.com/opengapps/package-api
22

3-
go 1.13
3+
go 1.18
44

55
require (
6-
github.com/google/go-github/v37 v37.0.0
6+
github.com/google/go-github/v47 v47.0.0
77
github.com/gorilla/feeds v1.1.1
88
github.com/gorilla/handlers v1.5.1
99
github.com/gorilla/mux v1.8.0
1010
github.com/opengapps/package-api/pkg/gapps v1.0.0
11-
github.com/sirupsen/logrus v1.8.1
11+
github.com/sirupsen/logrus v1.9.0
1212
github.com/spf13/pflag v1.0.5
13-
github.com/spf13/viper v1.8.1
14-
github.com/stretchr/testify v1.7.0
13+
github.com/spf13/viper v1.13.0
14+
github.com/stretchr/testify v1.8.0
1515
go.etcd.io/bbolt v1.3.6
16-
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914
17-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
16+
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1
17+
golang.org/x/sync v0.0.0-20220907140024-f12130a52804
18+
)
19+
20+
require (
21+
github.com/davecgh/go-spew v1.1.1 // indirect
22+
github.com/felixge/httpsnoop v1.0.3 // indirect
23+
github.com/fsnotify/fsnotify v1.5.4 // indirect
24+
github.com/golang/protobuf v1.5.2 // indirect
25+
github.com/google/go-querystring v1.1.0 // indirect
26+
github.com/hashicorp/hcl v1.0.0 // indirect
27+
github.com/magiconair/properties v1.8.6 // indirect
28+
github.com/mitchellh/mapstructure v1.5.0 // indirect
29+
github.com/pelletier/go-toml v1.9.5 // indirect
30+
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
31+
github.com/pmezard/go-difflib v1.0.0 // indirect
32+
github.com/spf13/afero v1.9.2 // indirect
33+
github.com/spf13/cast v1.5.0 // indirect
34+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
35+
github.com/subosito/gotenv v1.4.1 // indirect
36+
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
37+
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
38+
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 // indirect
39+
golang.org/x/text v0.3.7 // indirect
40+
google.golang.org/appengine v1.6.7 // indirect
41+
google.golang.org/protobuf v1.28.1 // indirect
42+
gopkg.in/ini.v1 v1.67.0 // indirect
43+
gopkg.in/yaml.v2 v2.4.0 // indirect
44+
gopkg.in/yaml.v3 v3.0.1 // indirect
1845
)
1946

2047
replace github.com/opengapps/package-api/pkg/gapps => ./pkg/gapps

go.sum

Lines changed: 71 additions & 169 deletions
Large diffs are not rendered by default.

go.work

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
go 1.18
2+
3+
use (
4+
.
5+
./pkg/gapps
6+
)

pkg/gapps/android_enumer.go

Lines changed: 78 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/gapps/gapps.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const (
3535
Android90
3636
Android100
3737
Android110
38+
Android120
39+
Android121
3840
)
3941

4042
// HumanString is required for human-readable Android version with . delimiter

pkg/gapps/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/opengapps/package-api/pkg/gapps
22

3-
go 1.13
3+
go 1.18

pkg/gapps/platform_enumer.go

Lines changed: 40 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)