Skip to content

Commit

Permalink
chore: bump stuff
Browse files Browse the repository at this point in the history
Also fix .golangci.yml file.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
  • Loading branch information
DmitriyMV committed Feb 9, 2024
1 parent 087b50f commit 5324d39
Show file tree
Hide file tree
Showing 97 changed files with 6,511 additions and 9,916 deletions.
41 changes: 5 additions & 36 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@

# options for analysis running
run:
go: '1.18'
# default concurrency is a available CPU number
# concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
deadline: 10m
timeout: 10m

# exit code when at least one issue was found, default is 1
issues-exit-code: 1
Expand All @@ -35,6 +34,7 @@ run:
output:
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
format: line-number
sort-results: true

# all available settings of specific linters
linters-settings:
Expand All @@ -55,9 +55,6 @@ linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
dupl:
# tokens count to trigger issue, 150 by default
threshold: 100
Expand All @@ -66,14 +63,6 @@ linters-settings:
min-len: 3
# minimal occurrences count to trigger, 3 by default
min-occurrences: 3
depguard:
list-type: blacklist
packages:
- github.com/golang/protobuf/proto
- google.golang.org/protobuf/proto
packages-with-error-message:
- google.golang.org/protobuf/proto: Use "github.com/siderolabs/talos/pkg/machinery/proto" instead.
github.com/golang/protobuf/proto: Use "github.com/siderolabs/talos/pkg/machinery/proto" instead.
misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
Expand All @@ -85,28 +74,8 @@ linters-settings:
line-length: 200
# tab width in spaces. Default to 1.
tab-width: 1
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# call graph construction algorithm (cha, rta). In general, use cha for libraries,
# and rta for programs with main packages. Default is cha.
algo: cha

# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
nakedret:
# make an issue if func has more lines of code than this setting and it has naked returns; default is 30
max-func-lines: 30
nolintlint:
allow-unused: false
allow-leading-space: false
allow-no-explanation: []
require-explanation: false
require-specific: true
Expand Down Expand Up @@ -146,14 +115,13 @@ linters:
- forbidigo
- forcetypeassert
- funlen
- gas
- gochecknoglobals
- gochecknoinits
- gocognit
- godox
- goerr113
- gomnd
- ifshort
- gosec
- ireturn # we return interfaces
- maintidx
- nestif
Expand Down Expand Up @@ -184,7 +152,8 @@ linters:
- varcheck
- structcheck
- deadcode

- ifshort
- perfsprint
disable-all: false
fast: false

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ GO_VERSION ?= 1.21
# renovate: datasource=go depName=golang.org/x/tools
GOIMPORTS_VERSION ?= v0.17.0
# renovate: datasource=go depName=mvdan.cc/gofumpt
GOFUMPT_VERSION ?= v0.5.0
GOFUMPT_VERSION ?= v0.6.0
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCILINT_VERSION ?= v1.55.2
GOLANGCILINT_VERSION ?= v1.56.1
# renovate: datasource=go depName=golang.org/x/tools
STRINGER_VERSION ?= v0.17.0
# renovate: datasource=go depName=github.com/alvaroloes/enumer
ENUMER_VERSION ?= v1.1.2
# renovate: datasource=go depName=k8s.io/code-generator
DEEPCOPY_GEN_VERSION ?= v0.29.0
DEEPCOPY_GEN_VERSION ?= v0.29.1
# renovate: datasource=go depName=github.com/planetscale/vtprotobuf
VTPROTOBUF_VERSION ?= v0.5.0
VTPROTOBUF_VERSION ?= v0.6.0
# renovate: datasource=go depName=github.com/siderolabs/deep-copy
DEEPCOPY_VERSION ?= v0.5.5
# renovate: datasource=go depName=github.com/siderolabs/importvet
Expand Down
Binary file modified api/api.descriptors
Binary file not shown.
6 changes: 2 additions & 4 deletions cmd/installer/pkg/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (i *Installer) Install(ctx context.Context, mode Mode) (err error) {
}

for _, label := range bootLabels {
err = func() error {
if err = func() error {
var device string
// searching targets for the device to be used
OuterLoop:
Expand Down Expand Up @@ -248,9 +248,7 @@ func (i *Installer) Install(ctx context.Context, mode Mode) (err error) {
mountpoints.Set(label, mountpoint)

return nil
}()

if err != nil {
}(); err != nil {
return err
}
}
Expand Down
1 change: 0 additions & 1 deletion cmd/installer/pkg/install/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ func (m *Manifest) executeOnDevice(device Device, targets []*Target) (err error)

return nil
})

if err != nil {
return fmt.Errorf("failed to format device: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion cmd/talosctl/cmd/talos/kubeconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ func extractAndMerge(data []byte, localPath string) error {
return askOverwriteOrRename(fmt.Sprintf("%s %q already exists", component, name))
},
})

if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion cmd/talosctl/cmd/talos/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ var memoryCmd = &cobra.Command{
verboseRender(&remotePeer, resp)
} else {
err = briefRender(&remotePeer, resp)

if err != nil {
return err
}
Expand Down
12 changes: 6 additions & 6 deletions cmd/talosctl/cmd/talos/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func getPathFromNode(path, filter string) map[string]struct{} {
}

func getServiceFromNode() []string {
var svcIds []string
var svcIDs []string

//nolint:errcheck
GlobalArgs.WithClient(
Expand All @@ -166,19 +166,19 @@ func getServiceFromNode() []string {
for _, msg := range resp.Messages {
for _, s := range msg.Services {
svc := cli.ServiceInfoWrapper{ServiceInfo: s}
svcIds = append(svcIds, svc.Id)
svcIDs = append(svcIDs, svc.Id)
}
}

return nil
},
)

return svcIds
return svcIDs
}

func getContainersFromNode(kubernetes bool) []string {
var containerIds []string
var containerIDs []string

//nolint:errcheck
GlobalArgs.WithClient(
Expand Down Expand Up @@ -211,15 +211,15 @@ func getContainersFromNode(kubernetes bool) []string {
continue
}

containerIds = append(containerIds, p.Id)
containerIDs = append(containerIDs, p.Id)
}
}

return nil
},
)

return containerIds
return containerIDs
}

func mergeSuggestions(a, b []string) []string {
Expand Down
2 changes: 2 additions & 0 deletions cmd/talosctl/cmd/talos/support.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ func openArchive() (*os.File, error) {
}
} else {
buf := bufio.NewReader(os.Stdin)

fmt.Printf("%s already exists, overwrite? [y/N]: ", supportCmdFlags.output)

choice, err := buf.ReadString('\n')
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions cmd/talosctl/pkg/talos/action/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func (a *nodeTracker) trackEventsWithRetry(actorIDCh chan string) error {
// retryable function
err := func() error {
eventCh := make(chan client.EventResult)

err := a.cli.EventsWatchV2(ctx, eventCh, client.WithTailEvents(tailEvents))
if err != nil {
return err
Expand Down
38 changes: 19 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require (

require (
cloud.google.com/go/compute/metadata v0.2.3
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.1
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.2
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.0.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.1
Expand All @@ -47,9 +47,9 @@ require (
github.com/containernetworking/plugins v1.4.0
github.com/coredns/coredns v1.11.1
github.com/coreos/go-iptables v0.7.0
github.com/cosi-project/runtime v0.4.0-alpha.4
github.com/cosi-project/runtime v0.4.0-alpha.5
github.com/distribution/reference v0.5.0
github.com/docker/docker v25.0.2+incompatible
github.com/docker/docker v25.0.3+incompatible
github.com/docker/go-connections v0.5.0
github.com/dustin/go-humanize v1.0.1
github.com/ecks/uefi v0.0.0-20221116212947-caef65d070eb
Expand Down Expand Up @@ -94,16 +94,15 @@ require (
github.com/opencontainers/runtime-spec v1.1.0
github.com/packethost/packngo v0.31.0
github.com/pelletier/go-toml v1.9.5
github.com/pin/tftp v2.1.1-0.20200117065540-2f79be2dba4e+incompatible
github.com/pin/tftp/v3 v3.1.0
github.com/pmorjan/kmod v1.1.1
github.com/prometheus/procfs v0.12.0
github.com/rivo/tview v0.0.0-20240122063236-8526c9fe1b54
github.com/rivo/tview v0.0.0-20240204151237-861aa94d61c8
github.com/rs/xid v1.5.0
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/ryanuber/go-glob v1.0.0
github.com/safchain/ethtool v0.3.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.22
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.23
github.com/siderolabs/crypto v0.4.1
github.com/siderolabs/discovery-api v0.1.3
github.com/siderolabs/discovery-client v0.1.6
Expand Down Expand Up @@ -131,7 +130,7 @@ require (
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.8.4
github.com/u-root/u-root v0.12.0
github.com/u-root/u-root v0.13.0
github.com/ulikunitz/xz v0.5.11
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vmware-tanzu/sonobuoy v0.57.1
Expand All @@ -143,11 +142,11 @@ require (
go.etcd.io/etcd/etcdutl/v3 v3.5.12
go.uber.org/zap v1.26.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
golang.org/x/net v0.20.0
golang.org/x/oauth2 v0.16.0
golang.org/x/net v0.21.0
golang.org/x/oauth2 v0.17.0
golang.org/x/sync v0.6.0
golang.org/x/sys v0.16.0
golang.org/x/term v0.16.0
golang.org/x/sys v0.17.0
golang.org/x/term v0.17.0
golang.org/x/text v0.14.0
golang.org/x/time v0.5.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
Expand All @@ -164,7 +163,7 @@ require (
github.com/0x5a17ed/itkit v0.6.0 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect
Expand Down Expand Up @@ -193,7 +192,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/cilium/ebpf v0.12.3 // indirect
github.com/cloudflare/circl v1.3.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/continuity v0.4.2 // indirect
github.com/containerd/fifo v1.1.0 // indirect
Expand Down Expand Up @@ -284,12 +283,13 @@ require (
github.com/pierrec/lz4/v4 v4.1.14 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/rifflock/lfshook v0.0.0-20180920164130-b9218ef580f5 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rivo/uniseg v0.4.7-0.20240127222946-601bbb3750c2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/sethgrid/pester v1.2.0 // indirect
Expand All @@ -301,7 +301,7 @@ require (
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.14.0 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/u-root/uio v0.0.0-20230305220412-3e8cd9d6bf63 // indirect
github.com/u-root/uio v0.0.0-20240118234441-a3c409a6018e // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
Expand All @@ -319,16 +319,16 @@ require (
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20231219180239-dc181d75b848 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading

0 comments on commit 5324d39

Please sign in to comment.