Skip to content

Commit bce2269

Browse files
authored
Merge pull request #146 from mahmednabil109/update_go_version
Update go version
2 parents 78e6b2f + ca70d02 commit bce2269

File tree

17 files changed

+89
-81
lines changed

17 files changed

+89
-81
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/setup-go@v2
2626
with:
2727
stable: "false"
28-
go-version: "1.16.2"
28+
go-version: "1.18"
2929
- name: set up environment variables
3030
run: |
3131
# must do this here because `env` doesn't allow variable expansion

.github/workflows/ui-build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/setup-go@v2
1515
with:
1616
stable: "false"
17-
go-version: "1.16.2"
17+
go-version: "1.18"
1818
- uses: actions/setup-node@v2
1919
with:
2020
node-version: "16.15.1"

cmds/clients/contestcli/cli/verbs.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"errors"
1313
"fmt"
1414
"io"
15-
"io/ioutil"
1615
"os"
1716
"strconv"
1817
"strings"
@@ -38,13 +37,13 @@ func run(requestor string, transport transport.Transport, stdout io.Writer) erro
3837
var jobDesc []byte
3938
if flagSet.Arg(1) == "" {
4039
fmt.Fprintf(os.Stderr, "Reading from stdin...\n")
41-
jd, err := ioutil.ReadAll(os.Stdin)
40+
jd, err := io.ReadAll(os.Stdin)
4241
if err != nil {
4342
return fmt.Errorf("failed to read job descriptor: %w", err)
4443
}
4544
jobDesc = jd
4645
} else {
47-
jd, err := ioutil.ReadFile(flagSet.Arg(1))
46+
jd, err := os.ReadFile(flagSet.Arg(1))
4847
if err != nil {
4948
return fmt.Errorf("failed to read job descriptor: %w", err)
5049
}

cmds/contest-generator/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"io"
66
"log"
77
"os"
88
"path"
@@ -147,7 +147,7 @@ func readConfig(filename string) (*Config, error) {
147147
log.Printf("Error closing file '%s': %v", filename, err)
148148
}
149149
}()
150-
data, err := ioutil.ReadAll(r)
150+
data, err := io.ReadAll(r)
151151
if err != nil {
152152
return nil, fmt.Errorf("failed to read file: %w", err)
153153
}

cmds/contest-generator/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ package main
77

88
import (
99
"fmt"
10-
"io/ioutil"
1110
"log"
1211
"os"
1312
"path"
@@ -34,7 +33,7 @@ func main() {
3433
flag.Usage = usage
3534
flag.Parse()
3635

37-
data, err := ioutil.ReadFile(*flagTemplate)
36+
data, err := os.ReadFile(*flagTemplate)
3837
if err != nil {
3938
log.Fatalf("Failed to read template file '%s': %v", *flagTemplate, err)
4039
}
@@ -48,7 +47,7 @@ func main() {
4847
}
4948
outfile := *flagOutfile
5049
if outfile == "" {
51-
tmpdir, err := ioutil.TempDir("", "contest")
50+
tmpdir, err := os.MkdirTemp("", "contest")
5251
if err != nil {
5352
log.Fatalf("Cannot create temporary directory: %v", err)
5453
}

docker/mysql/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM mysql:8.0-debian
33
# Configure golang environment to run migration against database
44
ARG TARGETARCH
55
RUN apt-get update && apt-get install -y curl && apt-get clean
6-
RUN curl -L https://golang.org/dl/go1.16.2.linux-$TARGETARCH.tar.gz | tar xzf -
6+
RUN apt-get install -y git
7+
RUN curl -L https://golang.org/dl/go1.18.linux-$TARGETARCH.tar.gz | tar xzf -
78
ENV GOROOT=/go
89
ENV PATH=$PATH:/go/bin
910

go.mod

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
module github.com/linuxboot/contest
22

3-
go 1.15
3+
go 1.18
44

55
require (
6-
github.com/OneOfOne/xxhash v1.2.8 // indirect
76
github.com/aws/aws-sdk-go v1.41.14
87
github.com/benbjohnson/clock v1.1.0
98
github.com/chappjc/logrus-prefix v0.0.0-20180227015900-3a1d64819adb
10-
github.com/fsnotify/fsnotify v1.4.9 // indirect
119
github.com/gin-gonic/gin v1.8.1
12-
github.com/go-playground/validator/v10 v10.11.0 // indirect
1310
github.com/go-sql-driver/mysql v1.6.0
14-
github.com/goccy/go-json v0.9.8 // indirect
1511
github.com/google/go-safeweb v0.0.0-20211026121254-697f59a9d57f
1612
github.com/google/uuid v1.3.0
1713
github.com/insomniacslk/termhook v0.0.0-20210329134026-a267c978e590
1814
github.com/insomniacslk/xjson v0.0.0-20210106140854-1589ccfd1a1a
1915
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
20-
github.com/mattn/go-colorable v0.1.11 // indirect
21-
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
22-
github.com/onsi/ginkgo v1.12.0 // indirect
23-
github.com/onsi/gomega v1.9.0 // indirect
24-
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
2516
github.com/pkg/sftp v1.13.4
26-
github.com/pkg/term v1.1.0 // indirect
2717
github.com/pressly/goose v2.7.0+incompatible
2818
github.com/prometheus/client_golang v1.12.2
2919
github.com/prometheus/client_model v0.2.0
@@ -33,20 +23,68 @@ require (
3323
github.com/stretchr/testify v1.8.0
3424
github.com/u-root/cpu v0.0.0-20210922222005-0a371c3a086d
3525
github.com/u-root/u-root v7.0.0+incompatible
36-
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
37-
github.com/xaionaro-go/atomicmap v0.0.0-20210620215405-96a7f1f95a70 // indirect
3826
github.com/xaionaro-go/metrics v0.0.0-20210425194006-68050b337673
39-
github.com/xaionaro-go/spinlock v0.0.0-20200518175509-30e6d1ce68a1 // indirect
4027
github.com/xaionaro-go/statuspage v0.0.0-20220629202611-97b44b308599
4128
github.com/xaionaro-go/unsafetools v0.0.0-20210722164218-75ba48cf7b3c
4229
go.mongodb.org/mongo-driver v1.9.1
4330
go.uber.org/atomic v1.9.0
44-
go.uber.org/multierr v1.7.0 // indirect
4531
go.uber.org/zap v1.19.1
4632
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d
33+
golang.org/x/text v0.3.7
34+
gopkg.in/yaml.v2 v2.4.0
35+
gopkg.in/yaml.v3 v3.0.1
36+
)
37+
38+
require (
39+
github.com/OneOfOne/xxhash v1.2.8 // indirect
40+
github.com/beorn7/perks v1.0.1 // indirect
41+
github.com/cespare/xxhash/v2 v2.1.2 // indirect
42+
github.com/davecgh/go-spew v1.1.1 // indirect
43+
github.com/demdxx/gocast v1.2.0 // indirect
44+
github.com/fatih/structs v1.1.0 // indirect
45+
github.com/gin-contrib/sse v0.1.0 // indirect
46+
github.com/go-playground/locales v0.14.0 // indirect
47+
github.com/go-playground/universal-translator v0.18.0 // indirect
48+
github.com/go-playground/validator/v10 v10.11.0 // indirect
49+
github.com/go-stack/stack v1.8.0 // indirect
50+
github.com/goccy/go-json v0.9.8 // indirect
51+
github.com/golang/protobuf v1.5.2 // indirect
52+
github.com/golang/snappy v0.0.1 // indirect
53+
github.com/hugelgupf/p9 v0.1.0 // indirect
54+
github.com/jmespath/go-jmespath v0.4.0 // indirect
55+
github.com/json-iterator/go v1.1.12 // indirect
56+
github.com/kevinburke/ssh_config v1.1.0 // indirect
57+
github.com/klauspost/compress v1.13.6 // indirect
58+
github.com/kr/fs v0.1.0 // indirect
59+
github.com/leodido/go-urn v1.2.1 // indirect
60+
github.com/mattn/go-colorable v0.1.11 // indirect
61+
github.com/mattn/go-isatty v0.0.14 // indirect
62+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
63+
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
64+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
65+
github.com/modern-go/reflect2 v1.0.2 // indirect
66+
github.com/onsi/ginkgo v1.12.0 // indirect
67+
github.com/onsi/gomega v1.9.0 // indirect
68+
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
69+
github.com/pkg/errors v0.9.1 // indirect
70+
github.com/pkg/term v1.1.0 // indirect
71+
github.com/pmezard/go-difflib v1.0.0 // indirect
72+
github.com/prometheus/procfs v0.7.3 // indirect
73+
github.com/stretchr/objx v0.4.0 // indirect
74+
github.com/ugorji/go/codec v1.2.7 // indirect
75+
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
76+
github.com/xaionaro-go/atomicmap v0.0.0-20210620215405-96a7f1f95a70 // indirect
77+
github.com/xaionaro-go/spinlock v0.0.0-20200518175509-30e6d1ce68a1 // indirect
78+
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
79+
github.com/xdg-go/scram v1.0.2 // indirect
80+
github.com/xdg-go/stringprep v1.0.2 // indirect
81+
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
82+
go.uber.org/multierr v1.7.0 // indirect
83+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
84+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
4785
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
86+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
4887
golang.org/x/tools v0.1.12 // indirect
4988
golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect
50-
gopkg.in/yaml.v2 v2.4.0
51-
gopkg.in/yaml.v3 v3.0.1
89+
google.golang.org/protobuf v1.28.0 // indirect
5290
)

0 commit comments

Comments
 (0)