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
10 changes: 1 addition & 9 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -44,41 +43,34 @@ 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
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
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
Expand Down
2 changes: 1 addition & 1 deletion cmd/grype-db/application/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/grype-db/cli/internal/pull/provider_run_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/grype-db/cli/options/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/format/tprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
24 changes: 12 additions & 12 deletions internal/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
}
Loading