Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove hollow.sh #138

Merged
merged 2 commits into from
Sep 18, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/push-pr-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
skip-cache: true
args: --config .golangci.yml --timeout 2m
version: v1.56.2
version: v1.61.0

- name: Test
run: go test ./...
Expand Down
13 changes: 5 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: v1.56.2 # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: v1.61.0 # use the fixed version to not introduce new linters unexpectedly

linters-settings:
govet:
auto-fix: true
check-shadowing: true
settings:
printf:
funcs:
Expand Down Expand Up @@ -44,6 +43,7 @@ linters-settings:
extra-rules: true
whitespace:
auto-fix: true
shadow: true

linters:
enable:
Expand Down Expand Up @@ -82,14 +82,11 @@ linters:
enable-all: false
disable-all: true

run:
# build-tags:
skip-dirs:
issues:
exclude-dirs:
- internal/fixtures
skip-files:
exclude-files:
- "(.*/)*.*_test.go"

issues:
exclude-rules:
- linters:
- gosec
Expand Down
2 changes: 1 addition & 1 deletion cmd/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (e *ErrUnexpectedResponse) Error() string {
s += " response message: " + e.message
}

return fmt.Sprintf("Unexpected response from Conditions API " + s)
return "Unexpected response from Conditions API " + s
}

func newErrUnexpectedResponse(statusCode int, message string) error {
Expand Down
4 changes: 2 additions & 2 deletions cmd/create/firmware_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func createFWSetsFromFile(ctx context.Context, client *fleetdbapi.Client, flgs *
continue
}

log.Printf("Adding firmware object: " + fw.UUID.String())
log.Printf("Adding firmware object: %s", fw.UUID.String())
_, _, err = client.CreateServerComponentFirmware(ctx, fw)
if err != nil {
log.Fatal("error adding firmware object: ", err)
Expand All @@ -98,7 +98,7 @@ func createFWSetsFromFile(ctx context.Context, client *fleetdbapi.Client, flgs *
firmwareAdded[fw.UUID.String()] = true
}

log.Printf("Adding firmware-set object: " + set.UUID.String())
log.Printf("Adding firmware-set object: %s", set.UUID.String())
req := fleetdbapi.ComponentFirmwareSetRequest{
ID: set.UUID,
Attributes: set.Attributes,
Expand Down
54 changes: 16 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/metal-toolbox/mctl

go 1.22
go 1.23

toolchain go1.22.1
toolchain go1.23.1

require (
github.com/adrg/xdg v0.4.0
Expand All @@ -11,10 +11,10 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/dustin/go-humanize v1.0.1
github.com/google/uuid v1.6.0
github.com/metal-toolbox/bomservice v0.1.5
github.com/metal-toolbox/conditionorc v1.1.4
github.com/metal-toolbox/fleetdb v1.19.3
github.com/metal-toolbox/rivets v1.3.3
github.com/metal-toolbox/bomservice v0.1.6
github.com/metal-toolbox/conditionorc v1.1.8
github.com/metal-toolbox/fleetdb v1.19.5
github.com/metal-toolbox/rivets v1.3.7
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20220510032225-4f9f17eaec4c
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
Expand All @@ -23,26 +23,23 @@ require (
github.com/spf13/viper v1.19.0
github.com/zalando/go-keyring v0.2.5
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/net v0.27.0
golang.org/x/net v0.28.0
golang.org/x/oauth2 v0.22.0
gopkg.in/square/go-jose.v2 v2.6.0
)

require (
github.com/KyleBanks/depth v1.2.1 // indirect
github.com/alessio/shellescape v1.4.2 // indirect
github.com/alessio/shellescape v1.4.1 // indirect
github.com/banzaicloud/logrus-runtime-formatter v0.0.0-20190729070250-5ae5475bae5e // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.12.0 // indirect
github.com/bytedance/sonic v1.12.1 // indirect
github.com/bytedance/sonic/loader v0.2.0 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/cockroachdb/cockroach-go/v2 v2.3.8 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/equinix-labs/otel-init-go v0.0.9 // indirect
github.com/danieljoos/wincred v1.2.0 // indirect
github.com/ericlagergren/decimal v0.0.0-20240411145413-00de7ca16731 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/friendsofgo/errors v0.9.2 // indirect
Expand All @@ -52,10 +49,6 @@ require (
github.com/gin-gonic/gin v1.10.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/spec v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.0 // indirect
Expand All @@ -67,7 +60,6 @@ require (
github.com/gorilla/websocket v1.5.3 // indirect
github.com/gosimple/slug v1.14.0 // indirect
github.com/gosimple/unidecode v1.0.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
Expand All @@ -84,16 +76,14 @@ require (
github.com/jackc/pgtype v1.14.3 // indirect
github.com/jackc/pgx/v4 v4.18.3 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand All @@ -104,11 +94,10 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pquerna/cachecontrol v0.2.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_golang v1.20.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.6.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand All @@ -121,9 +110,6 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/swaggo/files v1.0.1 // indirect
github.com/swaggo/gin-swagger v1.6.0 // indirect
github.com/swaggo/swag v1.16.3 // indirect
github.com/tealeg/xlsx v1.0.5 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
Expand All @@ -134,28 +120,20 @@ require (
github.com/volatiletech/sqlboiler v3.7.1+incompatible // indirect
github.com/volatiletech/sqlboiler/v4 v4.16.2 // indirect
github.com/volatiletech/strmangle v0.0.6 // indirect
go.hollow.sh/serverservice v0.16.2 // indirect
go.hollow.sh/toolbox v0.6.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
gocloud.dev v0.38.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/arch v0.9.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
google.golang.org/api v0.189.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
Expand Down
Loading
Loading