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 @@ -340,7 +340,7 @@ lint: $(BUILD_DIRS)
--env GO111MODULE=on \
--env GOFLAGS="-mod=vendor" \
$(BUILD_IMAGE) \
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=10m --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/ui-server

go 1.23.0

toolchain go1.24.4
go 1.25.5

require (
github.com/lnquy/cron v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/registry/ui/backups/backupoverview.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (r *BackupOverviewStorage) getBackupOverview(ctx context.Context, cfg *stas
result.ManagedFields = nil
result.OwnerReferences = nil
result.Finalizers = nil
delete(result.ObjectMeta.Annotations, mu.LastAppliedConfigAnnotation)
delete(result.Annotations, mu.LastAppliedConfigAnnotation)

return result, nil
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/shared/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (
Timeout = 4 * time.Second
)

func GetDBVersion(obj map[string]interface{}) (string, error) {
func GetDBVersion(obj map[string]any) (string, error) {
val, found, err := unstructured.NestedFieldCopy(obj, "spec", "version")
if err != nil {
return "", err
Expand All @@ -40,15 +40,15 @@ func GetDBVersion(obj map[string]interface{}) (string, error) {
return val.(string), nil
}

func GetDatabaseType(obj map[string]interface{}) (string, error) {
func GetDatabaseType(obj map[string]any) (string, error) {
mode, err := resourcemetrics.Mode(obj)
if err != nil {
return "", err
}
return mode, nil
}

func GetDatabaseStatus(obj map[string]interface{}) (string, error) {
func GetDatabaseStatus(obj map[string]any) (string, error) {
val, found, err := unstructured.NestedFieldCopy(obj, "status", "phase")
if err != nil {
return "", err
Expand Down
Loading