1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-27 12:34:19 +03:00

build: upgrade to Go 1.17

Go 1.17 introduces compiler improvement
(https://golang.org/doc/go1.17#compiler) and supports module graph
pruning (https://golang.org/ref/mod#graph-pruning) and lazy module
loading (https://golang.org/ref/mod#lazy-loading).

This commit applies the changes by running `go mod tidy -go=1.17` to
enable module graph pruning and lazy module loading supported by Go 1.17
or higher.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun 2021-11-17 11:22:56 +08:00
parent 696479024e
commit da8beb65bf
No known key found for this signature in database
GPG Key ID: DAEBBD2E34C111E6
4 changed files with 23 additions and 10 deletions

View File

@ -12,5 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.17'
- run: go version
- run: go test -v ./...

View File

@ -1,10 +1,10 @@
FROM golang:1.16-alpine as builder
FROM golang:1.17-alpine as builder
RUN apk add --no-cache git
WORKDIR /go/croc
COPY . .
RUN go build -v -ldflags="-s -w"
FROM alpine:latest
FROM alpine:latest
EXPOSE 9009
EXPOSE 9010
EXPOSE 9011

View File

@ -101,7 +101,7 @@ On FreeBSD you can install with `pkg`:
pkg install croc
```
Or, you can [install Go](https://golang.org/dl/) and build from source (requires Go 1.15+):
Or, you can [install Go](https://golang.org/dl/) and build from source (requires Go 1.17+):
```
go install github.com/schollz/croc/v9@latest

25
go.mod
View File

@ -1,27 +1,38 @@
module github.com/schollz/croc/v9
go 1.13
go 1.17
require (
github.com/OneOfOne/xxhash v1.2.5 // indirect
github.com/cespare/xxhash v1.1.0
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/denisbrodbeck/machineid v1.0.1
github.com/kalafut/imohash v1.0.2
github.com/kr/pretty v0.1.0 // indirect
github.com/schollz/cli/v2 v2.2.1
github.com/schollz/logger v1.2.0
github.com/schollz/mnemonicode v1.0.1
github.com/schollz/pake/v3 v3.0.2
github.com/schollz/peerdiscovery v1.6.9
github.com/schollz/progressbar/v3 v3.8.3
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/stretchr/testify v1.6.1
github.com/tscholl2/siec v0.0.0-20210707234609-9bdfc483d499 // indirect
github.com/twmb/murmur3 v1.1.6 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6
)
require (
github.com/OneOfOne/xxhash v1.2.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/tscholl2/siec v0.0.0-20210707234609-9bdfc483d499 // indirect
github.com/twmb/murmur3 v1.1.6 // indirect
golang.org/x/sys v0.0.0-20211002104244-808efd93c36d // indirect
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)