From 68950e36106b6cf9fb3c051f9b35301b7a8ff321 Mon Sep 17 00:00:00 2001 From: anchore-oss-update-bot Date: Wed, 15 Apr 2026 09:20:36 +0000 Subject: [PATCH] chore(deps): update Go version Signed-off-by: anchore-oss-update-bot --- .github/actions/bootstrap/action.yaml | 10 +------- cmd/grype-db/application/application.go | 2 +- .../cli/internal/pull/provider_run_config.go | 2 +- cmd/grype-db/cli/options/utils.go | 2 +- go.mod | 2 +- internal/format/tprint.go | 2 +- internal/log/log.go | 24 +++++++++---------- 7 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/actions/bootstrap/action.yaml b/.github/actions/bootstrap/action.yaml index 2df9b034..05f49a3b 100644 --- a/.github/actions/bootstrap/action.yaml +++ b/.github/actions/bootstrap/action.yaml @@ -12,7 +12,7 @@ inputs: go-version: description: "Go version to install" required: true - default: "1.25.x" + default: "1.26.2" python-version: description: "Python version to install" required: true @@ -35,7 +35,6 @@ inputs: bootstrap-apt-packages: description: "Space delimited list of tools to install via apt" default: "sqlite3 libsqlite3-dev" - runs: using: "composite" steps: @@ -44,23 +43,19 @@ runs: with: go-version: ${{ inputs.go-version }} check-latest: true - - name: Install uv if: inputs.python == 'true' uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 with: enable-cache: true - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 #v6.2.0 if: inputs.python == 'true' with: python-version: ${{ inputs.python-version }} - - name: Bootstrap python dependencies if: inputs.python == 'true' shell: bash run: make bootstrap-python - - name: Restore tool cache if: inputs.tools == 'true' id: tool-cache @@ -68,17 +63,14 @@ runs: with: path: ${{ github.workspace }}/.tool key: ${{ inputs.cache-key-prefix }}-${{ runner.os }}-${{ runner.arch }}-tool-${{ hashFiles('.binny.yaml') }} - - name: (cache-miss) Bootstrap project tools shell: bash if: steps.tool-cache.outputs.cache-hit != 'true' && inputs.tools == 'true' run: make bootstrap-tools - - name: (cache-miss) Bootstrap go dependencies shell: bash if: inputs.go == 'true' && steps.go-mod-cache.outputs.cache-hit != 'true' && inputs.use-go-cache == 'true' run: make bootstrap-go - - name: Install apt packages if: inputs.bootstrap-apt-packages != '' shell: bash diff --git a/cmd/grype-db/application/application.go b/cmd/grype-db/application/application.go index 61de0cfa..02ce4013 100644 --- a/cmd/grype-db/application/application.go +++ b/cmd/grype-db/application/application.go @@ -131,7 +131,7 @@ func (a Application) Run(ctx context.Context, errs <-chan error) error { return err } -func logConfiguration(app *Config, opts interface{}) { +func logConfiguration(app *Config, opts any) { var optsStr string if opts != nil { diff --git a/cmd/grype-db/cli/internal/pull/provider_run_config.go b/cmd/grype-db/cli/internal/pull/provider_run_config.go index 8e221310..9bccc84d 100644 --- a/cmd/grype-db/cli/internal/pull/provider_run_config.go +++ b/cmd/grype-db/cli/internal/pull/provider_run_config.go @@ -7,7 +7,7 @@ import ( type ProviderRunConfig struct { provider.Identifier `yaml:",inline" mapstructure:",squash"` - Config interface{} `yaml:"config,omitempty" json:"config" mapstructure:"config"` + Config any `yaml:"config,omitempty" json:"config" mapstructure:"config"` } func (c ProviderRunConfig) Redact() { diff --git a/cmd/grype-db/cli/options/utils.go b/cmd/grype-db/cli/options/utils.go index c97b9ede..fb8edc36 100644 --- a/cmd/grype-db/cli/options/utils.go +++ b/cmd/grype-db/cli/options/utils.go @@ -60,7 +60,7 @@ func FormatPositionalArgsHelp(args map[string]string) string { return "Arguments:\n" + strings.TrimSuffix(ret, "\n") } -func Summarize(itf interface{}, currentPath []string) string { +func Summarize(itf any, currentPath []string) string { var desc []string t := reflect.TypeOf(itf) diff --git a/go.mod b/go.mod index de3419e9..666b1baa 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/anchore/grype-db -go 1.25.8 +go 1.26.2 require ( github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d diff --git a/internal/format/tprint.go b/internal/format/tprint.go index fc75400b..77fd682f 100644 --- a/internal/format/tprint.go +++ b/internal/format/tprint.go @@ -6,7 +6,7 @@ import ( ) // Tprintf renders a string from a given template string and field values -func Tprintf(tmpl string, data map[string]interface{}) string { +func Tprintf(tmpl string, data map[string]any) string { t := template.Must(template.New("").Parse(tmpl)) buf := &bytes.Buffer{} if err := t.Execute(buf, data); err != nil { diff --git a/internal/log/log.go b/internal/log/log.go index f066720d..157318a6 100644 --- a/internal/log/log.go +++ b/internal/log/log.go @@ -27,61 +27,61 @@ func Redact(value ...string) { } // Errorf takes a formatted template string and template arguments for the error logging level. -func Errorf(format string, args ...interface{}) { +func Errorf(format string, args ...any) { log.Errorf(format, args...) } // Error logs the given arguments at the error logging level. -func Error(args ...interface{}) { +func Error(args ...any) { log.Error(args...) } // Warnf takes a formatted template string and template arguments for the warning logging level. -func Warnf(format string, args ...interface{}) { +func Warnf(format string, args ...any) { log.Warnf(format, args...) } // Warn logs the given arguments at the warning logging level. -func Warn(args ...interface{}) { +func Warn(args ...any) { log.Warn(args...) } // Infof takes a formatted template string and template arguments for the info logging level. -func Infof(format string, args ...interface{}) { +func Infof(format string, args ...any) { log.Infof(format, args...) } // Info logs the given arguments at the info logging level. -func Info(args ...interface{}) { +func Info(args ...any) { log.Info(args...) } // Debugf takes a formatted template string and template arguments for the debug logging level. -func Debugf(format string, args ...interface{}) { +func Debugf(format string, args ...any) { log.Debugf(format, args...) } // Debug logs the given arguments at the debug logging level. -func Debug(args ...interface{}) { +func Debug(args ...any) { log.Debug(args...) } // Tracef takes a formatted template string and template arguments for the trace logging level. -func Tracef(format string, args ...interface{}) { +func Tracef(format string, args ...any) { log.Tracef(format, args...) } // Trace logs the given arguments at the trace logging level. -func Trace(args ...interface{}) { +func Trace(args ...any) { log.Trace(args...) } // WithFields returns a message logger with multiple key-value fields. -func WithFields(fields ...interface{}) logger.MessageLogger { +func WithFields(fields ...any) logger.MessageLogger { return log.WithFields(fields...) } // Nested returns a new logger with hard coded key-value pairs -func Nested(fields ...interface{}) logger.Logger { +func Nested(fields ...any) logger.Logger { return log.Nested(fields...) }