Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade Go version #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

devdrops
Copy link

@devdrops devdrops commented Jun 1, 2022

Reason: 1.12 was released more than 3 years ago, and since then, many changes/fixes were applied.

The project may benefit from these changes if we consider facts like security and performance.

Test execution using Go 1.18 - click to expand

Obs: tests running in a Docker image (golang:1.18):

docker run -ti --rm -v $(pwd):/code -w /code golang:1.18 sh
# go test -v --cover ./...
=== RUN   TestEncoderNoWrite
--- PASS: TestEncoderNoWrite (0.00s)
=== RUN   TestEncoderEmptyWrite
--- PASS: TestEncoderEmptyWrite (0.00s)
=== RUN   TestWriter
--- PASS: TestWriter (0.02s)
=== RUN   TestIssue22
--- PASS: TestIssue22 (6.89s)
=== RUN   TestEncoderStreams
--- PASS: TestEncoderStreams (0.13s)
=== RUN   TestEncoderLargeInput
--- PASS: TestEncoderLargeInput (2.46s)
=== RUN   TestEncoderFlush
--- PASS: TestEncoderFlush (0.00s)
=== RUN   TestDecoderStreaming
=== RUN   TestDecoderStreaming/Segment0
=== RUN   TestDecoderStreaming/Segment1
=== RUN   TestDecoderStreaming/Segment2
--- PASS: TestDecoderStreaming (0.00s)
    --- PASS: TestDecoderStreaming/Segment0 (0.00s)
    --- PASS: TestDecoderStreaming/Segment1 (0.00s)
    --- PASS: TestDecoderStreaming/Segment2 (0.00s)
=== RUN   TestReader
--- PASS: TestReader (0.00s)
=== RUN   TestDecode
--- PASS: TestDecode (0.00s)
=== RUN   TestQuality
--- PASS: TestQuality (0.08s)
=== RUN   TestDecodeFuzz
--- PASS: TestDecodeFuzz (0.00s)
=== RUN   TestDecodeTrailingData
--- PASS: TestDecodeTrailingData (0.00s)
=== RUN   TestEncodeDecode
    brotli_test.go:441: case "" x 0
    brotli_test.go:441: case "A" x 1
    brotli_test.go:441: case "<html><body><H1>Hello world</H1></body></html>" x 10
    brotli_test.go:441: case "<html><body><H1>Hello world</H1></body></html>" x 1000
--- PASS: TestEncodeDecode (0.00s)
=== RUN   ExampleWriter_Reset
--- PASS: ExampleWriter_Reset (0.00s)
PASS
coverage: 86.8% of statements
ok      github.com/andybalholm/brotli   9.587s  coverage: 86.8% of statements
# go version
go version go1.18.2 linux/amd64

From 1.12 to 1.18 (current suggested version)
@andybalholm
Copy link
Owner

I run it under Go 1.18 all the time now. But there's no reason I can think of that we should mark it as requiring Go 1.18, unless we actually use some features that are only available in Go 1.18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants