Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

chore(deps): bump github.com/klauspost/compress from 1.15.12 to 1.16.5 #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
run:
timeout-minutes: 30
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
flags: [""]
arch:
- amd64
runner:
- ubuntu-latest
- macos-latest
- windows-latest
go:
- "1.20.x"
include:
- arch: 386
runner: ubuntu-latest
go: ${{ inputs.go }}
- arch: amd64
runner: ubuntu-latest
flags: "-race"
go: ${{ inputs.go }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
cache: false

- name: Get Go environment
id: go-env
shell: bash
run: |
echo "cache=$(go env GOCACHE)" >> $GITHUB_ENV
echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_ENV

# Build cache key prefix, using runner OS and arch.
- name: Compute cache prefix
id: cache-prefix
shell: bash
env:
RUNNER_PREFIX: ${{ runner.os }}-${{ runner.arch }}-go
ARCH_PREFIX: ${{ matrix.arch != 'amd64' && format('-{0}', matrix.arch) || '' }}
RACE_PREFIX: ${{ contains(matrix.flags, '-race') && '-race' || '' }}
run: echo "cache_prefix=$RUNNER_PREFIX$ARCH_PREFIX$RACE_PREFIX" >> $GITHUB_ENV

- name: Set up cache
uses: actions/cache@v3
with:
path: |
${{ env.cache }}
${{ env.modcache }}
key: ${{ env.cache_prefix }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ env.cache_prefix }}-

- name: Run tests
env:
GOARCH: ${{ matrix.arch }}
GOFLAGS: ${{ matrix.flags }}
run: go test --timeout 30m ./...
2 changes: 0 additions & 2 deletions .github/workflows/x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
# Common Go workflows from go faster
# See https://github.com/go-faster/x
jobs:
test:
uses: go-faster/x/.github/workflows/test.yml@main
cover:
uses: go-faster/x/.github/workflows/cover.yml@main
lint:
Expand Down
97 changes: 97 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
linters-settings:
govet:
check-shadowing: true
gocyclo:
min-complexity: 15
maligned:
suggest-new: true
dupl:
threshold: 120
goconst:
min-len: 2
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: github.com/go-faster/
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- hugeParam
- rangeValCopy
- exitAfterDefer
- whyNoLint
- singleCaseSwitch
- commentedOutCode
- appendAssign
- unnecessaryBlock
- redundantSprint

linters:
disable-all: true
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused

# Breaks with buildssa error for some reason.
#- unparam

# Do not enable:
# - wsl (too opinionated about newlines)
# - godox (todos are OK)
# - bodyclose (false positives on helper functions)
# - prealloc (not worth it in scope of this project)
# - maligned (same as prealloc)
# - funlen (gocyclo is enough)
# - gochecknoglobals (we know when it is ok to use globals)
# - gochecknoinits (we know when it is ok to use inits)
# - dupl (too opinionated)

issues:
exclude-use-default: false
exclude-rules:
# Disable linters that are annoying in tests.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
- funlen
- goconst
- gocognit
- scopelint
- lll

# Ignore shadowing of err.
- linters: [govet]
text: 'declaration of "(err|ctx|log|c)"'

# Ignore linters in main packages.
- path: main\.go
linters: [goconst, funlen, gocognit, gocyclo]

# Ignore false-positive in test.
- linters: [unused]
text: "(type|field) `i` is unused"
file: 'yson/bugs_test\.go'

# Ignore error check in defer.
- linters: [errcheck]
source: 'defer .*\.(Close|Abort)\(\)'

# Allow old protobuf.
- linters: [staticcheck]
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated.*'
5 changes: 3 additions & 2 deletions bus/bus.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ import (
"net"
"sync"

"github.com/go-faster/yt/crc64"
"github.com/go-faster/yt/guid"
"go.ytsaurus.tech/library/go/core/log"
"go.ytsaurus.tech/library/go/core/log/nop"

"github.com/go-faster/yt/crc64"
"github.com/go-faster/yt/guid"
)

type AttributeKey string
Expand Down
3 changes: 2 additions & 1 deletion bus/bus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"net"
"testing"

"github.com/go-faster/yt/guid"
"github.com/stretchr/testify/require"

"github.com/go-faster/yt/guid"
)

func connPair() (a, b net.Conn, err error) {
Expand Down
11 changes: 6 additions & 5 deletions bus/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ import (
"sync"
"time"

"github.com/go-faster/yt/compression"
"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/proto/core/misc"
"github.com/go-faster/yt/proto/core/rpc"
"github.com/go-faster/yt/yterrors"
"github.com/golang/protobuf/proto"
"go.uber.org/atomic"
"go.ytsaurus.tech/library/go/core/log"
"go.ytsaurus.tech/library/go/core/log/nop"
"go.ytsaurus.tech/library/go/core/xerrors"
"go.ytsaurus.tech/library/go/ptr"

"github.com/go-faster/yt/compression"
"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/proto/core/misc"
"github.com/go-faster/yt/proto/core/rpc"
"github.com/go-faster/yt/yterrors"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions bus/send_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package bus
import (
"time"

"github.com/golang/protobuf/proto"
"go.ytsaurus.tech/library/go/ptr"

"github.com/go-faster/yt/compression"
"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/proto/core/misc"
"github.com/go-faster/yt/proto/core/rpc"
"github.com/go-faster/yt/proto/core/tracing"
"github.com/golang/protobuf/proto"
"go.ytsaurus.tech/library/go/ptr"
)

type SendOption interface {
Expand Down
1 change: 1 addition & 0 deletions examples/dynamic-table/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

"github.com/davecgh/go-spew/spew"

"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/migrate"
"github.com/go-faster/yt/schema"
Expand Down
3 changes: 2 additions & 1 deletion examples/ordered-dynamic-table/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"os"

"github.com/davecgh/go-spew/spew"
"go.ytsaurus.tech/library/go/ptr"

"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/migrate"
"github.com/go-faster/yt/schema"
"github.com/go-faster/yt/ypath"
"github.com/go-faster/yt/yt"
"github.com/go-faster/yt/yt/ythttp"
"go.ytsaurus.tech/library/go/ptr"
)

const (
Expand Down
1 change: 1 addition & 0 deletions examples/table-usage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"os"

"github.com/davecgh/go-spew/spew"

"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/schema"
"github.com/go-faster/yt/ypath"
Expand Down
3 changes: 2 additions & 1 deletion examples/vanilla-example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"os/exec"
"time"

"go.ytsaurus.tech/library/go/core/xerrors"

"github.com/go-faster/yt/mapreduce"
"github.com/go-faster/yt/mapreduce/spec"
"github.com/go-faster/yt/yt"
"github.com/go-faster/yt/yt/ythttp"
"go.ytsaurus.tech/library/go/core/xerrors"
)

const cluster = "freud"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ require (
github.com/andybalholm/brotli v1.0.4
github.com/cenkalti/backoff/v4 v4.1.3
github.com/davecgh/go-spew v1.1.1
github.com/go-faster/errors v0.6.1
github.com/gofrs/uuid v4.2.0+incompatible
github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.4
github.com/google/tink/go v1.6.0
github.com/klauspost/compress v1.15.12
github.com/klauspost/compress v1.16.5
github.com/mitchellh/copystructure v1.2.0
github.com/opentracing/opentracing-go v1.2.0
github.com/pierrec/lz4 v2.6.1+incompatible
Expand All @@ -25,7 +26,6 @@ require (
go.ytsaurus.tech/library/go/core/xerrors v0.0.2
go.ytsaurus.tech/library/go/ptr v0.0.1
golang.org/x/sync v0.1.0
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2
google.golang.org/protobuf v1.28.1
)

Expand Down
7 changes: 4 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI=
github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down Expand Up @@ -162,8 +164,8 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.15.12 h1:YClS/PImqYbn+UILDnqxQCZ3RehC9N318SU3kElDUEM=
github.com/klauspost/compress v1.15.12/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI=
github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
Expand Down Expand Up @@ -427,7 +429,6 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
Expand Down
9 changes: 5 additions & 4 deletions guid/guid.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (
"encoding/hex"
"fmt"

"github.com/go-faster/yt/yson"
"github.com/go-faster/errors"
"github.com/gofrs/uuid"
"golang.org/x/xerrors"

"github.com/go-faster/yt/yson"
)

// GUID is 16-byte value.
Expand Down Expand Up @@ -70,11 +71,11 @@ func ParseString(s string) (g GUID, err error) {
var n int
n, err = fmt.Sscanf(s, format, &d, &c, &b, &a)
if err != nil {
err = xerrors.Errorf("invalid GUID format: %v", err)
err = errors.Errorf("invalid GUID format: %v", err)
return
}
if n != 4 {
err = xerrors.Errorf("invalid GUID format")
err = errors.Errorf("invalid GUID format")
return
}

Expand Down
7 changes: 4 additions & 3 deletions mapreduce/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import (
"sync"

"github.com/cenkalti/backoff/v4"
"github.com/google/tink/go/aead"
"github.com/google/tink/go/keyset"
"github.com/google/tink/go/tink"

"github.com/go-faster/yt/guid"
"github.com/go-faster/yt/mapreduce/spec"
"github.com/go-faster/yt/ypath"
"github.com/go-faster/yt/yt"
"github.com/google/tink/go/aead"
"github.com/google/tink/go/keyset"
"github.com/google/tink/go/tink"
)

type Client interface {
Expand Down
Loading