Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "2"
linters:
default: standard
enable:
- unparam

formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'

issues:
max-same-issues: 100

exclude-files:
- generated.*\\.go

exclude-dirs:
- client
- vendor

run:
timeout: 10m
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ lint: $(BUILD_DIRS)
--env GO111MODULE=on \
--env GOFLAGS="-mod=vendor" \
$(BUILD_IMAGE) \
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=30m --exclude-files="generated.*\.go$\" --exclude-dirs-use-default --exclude-dirs=client,vendor
golangci-lint run

$(BUILD_DIRS):
@mkdir -p $@
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module stash.appscode.dev/nats

go 1.23.0

toolchain go1.24.4
go 1.25.5

require (
github.com/spf13/cobra v1.8.0
Expand Down
43 changes: 0 additions & 43 deletions lintconf.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (opt *natsOptions) writeStreamNamesToFile(sh *shell.Session) error {
}

func (opt *natsOptions) writeAll(sh *shell.Session) error {
args := []interface{}{
args := []any{
"stream",
"ls",
"--json",
Expand Down
4 changes: 2 additions & 2 deletions pkg/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (opt *natsOptions) restoreNATS(targetRef api_v1beta1.TargetRef) (*restic.Re
}

func removeMatchedStreams(sh *shell.Session, streams []string) error {
lsArgs := []interface{}{
lsArgs := []any{
"stream",
"ls",
"--json",
Expand All @@ -257,7 +257,7 @@ func removeMatchedStreams(sh *shell.Session, streams []string) error {
if err := json.Unmarshal(byteStreams, &currStreams); err != nil {
return err
}
rmArgs := []interface{}{
rmArgs := []any{
"stream",
"rm",
"-f",
Expand Down
2 changes: 1 addition & 1 deletion pkg/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func clearDir(dir string) error {
func (session sessionWrapper) waitForNATSReady(warningThreshold string) error {
klog.Infoln("Waiting for the nats server to be ready...")

args := []interface{}{
args := []any{
"server",
"check",
"connection",
Expand Down
Loading