From d87c61406753f7ef11d4bbecf05d5421880d5763 Mon Sep 17 00:00:00 2001 From: Greg Curtis Date: Fri, 29 Sep 2023 16:54:50 -0400 Subject: [PATCH] all: (mostly) automated clean up (#1513) - Unset any user-defined Go environment variables `devbox.json` to make builds more reproducible. Clean up some of the build scripts. - Remove `exp/slices` and `exp/maps` now that they're in the Go 1.21 stdlib. - Run `find . -name '*.go' -exec gofumpt -extra -w {} \+` to format Go files. - Upgrade dependencies that don't have any backwards incompatible changes. - Organize direct vs. indirect modules and run `go mod tidy`. --- .github/workflows/cli-tests.yaml | 1 + devbox.json | 33 +- go.mod | 75 ++-- go.sum | 353 ++++++++++++++---- internal/boxcli/auth.go | 6 +- internal/boxcli/gen-docs.go | 2 +- internal/boxcli/global.go | 2 +- internal/boxcli/run.go | 2 +- internal/cloud/cloud.go | 4 +- internal/cloud/mutagen/forward.go | 4 +- internal/cloud/mutagen/install.go | 4 +- internal/cloud/mutagen/wrapper.go | 3 +- internal/cloud/mutagenbox/mutagenbox.go | 2 +- internal/cloud/openssh/config.go | 22 +- internal/cloud/openssh/config_test.go | 56 +-- internal/cloud/openssh/sshshim/generate.go | 4 +- internal/cloud/openssh/username.go | 2 +- internal/cloud/user.go | 1 - internal/cloud/user_test.go | 1 - internal/cmdutil/cmdutil.go | 2 +- internal/cuecfg/cuecfg.go | 4 +- internal/devconfig/packages.go | 3 +- internal/devpkg/package.go | 2 - internal/fileutil/dir.go | 2 +- internal/fileutil/fileutil.go | 2 +- internal/fileutil/untar.go | 2 +- internal/impl/devbox.go | 2 +- internal/impl/dir_test.go | 8 +- internal/impl/generate/devcontainer_util.go | 6 +- internal/impl/global.go | 2 +- internal/impl/packages.go | 4 +- internal/impl/pure_shell.go | 3 +- internal/impl/util.go | 2 +- .../initrec/recommenders/dotnet/dotnet.go | 6 +- internal/initrec/recommenders/java/java.go | 4 +- .../initrec/recommenders/python/python_pip.go | 1 + .../recommenders/python/python_poetry.go | 1 + internal/integrations/envsec/envsec.go | 7 +- internal/lock/resolve.go | 8 +- internal/nix/nix.go | 3 +- internal/nix/nixpkgs.go | 4 +- internal/nix/nixprofile/profile.go | 1 - internal/nix/profiles.go | 4 +- internal/nix/run.go | 2 +- internal/nix/search.go | 9 +- internal/nix/upgrade.go | 1 - internal/plugin/plugin.go | 10 +- internal/pullbox/s3/pull.go | 1 - internal/searcher/parse.go | 2 +- internal/services/client.go | 9 +- internal/services/config.go | 2 +- internal/services/manager.go | 9 +- internal/services/status.go | 8 +- internal/shellgen/generate.go | 6 +- internal/shellgen/generate_test.go | 85 ++--- internal/shellgen/scripts.go | 6 +- internal/telemetry/sentry.go | 2 +- internal/templates/template.go | 8 +- internal/vercheck/vercheck.go | 1 - internal/vercheck/vercheck_test.go | 3 - internal/wrapnix/wrapper.go | 6 +- internal/xdg/xdg.go | 2 +- plugins/builtins.go | 3 +- testscripts/testrunner/assert.go | 2 +- testscripts/testrunner/examplesrunner.go | 3 +- testscripts/testrunner/setupenv.go | 4 +- testscripts/testrunner/updater/main.go | 1 - 67 files changed, 536 insertions(+), 309 deletions(-) diff --git a/.github/workflows/cli-tests.yaml b/.github/workflows/cli-tests.yaml index b72f6933e27..c96981c5609 100644 --- a/.github/workflows/cli-tests.yaml +++ b/.github/workflows/cli-tests.yaml @@ -64,6 +64,7 @@ jobs: - uses: actions/setup-go@v4 with: go-version-file: ./go.mod + - run: go run ./cmd/devbox run fmt - name: golangci-lint uses: golangci/golangci-lint-action@v3.7.0 with: diff --git a/devbox.json b/devbox.json index c60d097892a..9e224de0a45 100644 --- a/devbox.json +++ b/devbox.json @@ -4,23 +4,42 @@ "go@latest" ], "env": { + "GOENV": "off", "PATH": "$PATH:$PWD/dist" }, "shell": { "init_hook": [ - "export \"GOROOT=$(go env GOROOT)\"" + "unset CGO_ENABLED GO111MODULE GOARCH GOFLAGS GOMOD GOOS GOROOT GOTOOLCHAIN GOWORK" ], "scripts": { - "build": "go build -o dist/devbox cmd/devbox/main.go", - "build-linux": "GOOS=linux go build -o dist/devbox-linux cmd/devbox/main.go", - "build-linux-amd64": "GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 cmd/devbox/main.go", + "build": "go build -o dist/devbox ./cmd/devbox", + "build-all": [ + "GOOS=darwin GOARCH=amd64 go build -o dist/devbox-darwin-amd64 ./cmd/devbox", + "GOOS=darwin GOARCH=arm64 go build -o dist/devbox-darwin-arm64 ./cmd/devbox", + "GOOS=linux GOARCH=amd64 go build -o dist/devbox-linux-amd64 ./cmd/devbox", + "GOOS=linux GOARCH=arm64 go build -o dist/devbox-linux-arm64 ./cmd/devbox" + ], "code": "code .", "lint": "golangci-lint run", + "fmt": [ + "mkdir -p dist/tools", + "export GOBIN=\"$PWD/dist/tools\"", + "go install mvdan.cc/gofumpt@latest", + "if [ -n \"${CI:-}\" ]; then", + " unformatted=\"$(find . -name '*.go' -exec \"$GOBIN/gofumpt\" -l {} \\+ | awk '{ print \"\t\" $0 }')\"", + " if [ -n \"$unformatted\" ]; then", + " echo 'The following files need to be formatted with gofumpt:'", + " echo", + " echo \"$unformatted\"", + " echo", + " echo 'Run `devbox run fmt` to format them.'", + " exit 1", + " fi", + "fi", + "find . -name '*.go' -exec \"$GOBIN/gofumpt\" -extra -w {} \\+" + ], "test": "go test -race -cover ./...", "update-examples": "devbox run build && go run testscripts/testrunner/updater/main.go" } - }, - "nixpkgs": { - "commit": "3364b5b117f65fe1ce65a3cdd5612a078a3b31e3" } } diff --git a/go.mod b/go.mod index 25ae8062e48..c11e01f0aaf 100644 --- a/go.mod +++ b/go.mod @@ -3,32 +3,32 @@ module go.jetpack.io/devbox go 1.21 require ( - github.com/AlecAivazis/survey/v2 v2.3.6 + github.com/AlecAivazis/survey/v2 v2.3.7 github.com/MakeNowJust/heredoc/v2 v2.0.1 - github.com/alessio/shellescape v1.4.1 - github.com/aws/aws-sdk-go-v2 v1.18.0 - github.com/aws/aws-sdk-go-v2/config v1.18.25 - github.com/aws/aws-sdk-go-v2/credentials v1.13.24 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67 - github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1 - github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 + github.com/alessio/shellescape v1.4.2 + github.com/aws/aws-sdk-go-v2 v1.21.0 + github.com/aws/aws-sdk-go-v2/config v1.18.42 + github.com/aws/aws-sdk-go-v2/credentials v1.13.40 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.87 + github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 + github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 github.com/bmatcuk/doublestar/v4 v4.6.0 github.com/briandowns/spinner v1.23.0 github.com/cavaliergopher/grab/v3 v3.0.1 github.com/cloudflare/ahocorasick v0.0.0-20210425175752-730270c3e184 github.com/creekorful/mvnparser v1.5.0 github.com/denisbrodbeck/machineid v1.0.1 + github.com/f1bonacc1/process-compose v0.43.1 github.com/fatih/color v1.15.0 github.com/fsnotify/fsnotify v1.6.0 - github.com/getsentry/sentry-go v0.20.0 + github.com/getsentry/sentry-go v0.24.1 github.com/google/go-cmp v0.5.9 - github.com/google/uuid v1.3.0 + github.com/google/uuid v1.3.1 github.com/hashicorp/go-envparse v0.1.0 github.com/joho/godotenv v1.5.1 github.com/mattn/go-isatty v0.0.19 - github.com/mholt/archiver/v4 v4.0.0-alpha.7 - github.com/pelletier/go-toml/v2 v2.0.7 - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/mholt/archiver/v4 v4.0.0-alpha.8 + github.com/pelletier/go-toml/v2 v2.1.0 github.com/pkg/errors v0.9.1 github.com/rogpeppe/go-internal v1.11.0 github.com/samber/lo v1.38.1 @@ -39,9 +39,8 @@ require ( github.com/wk8/go-ordered-map/v2 v2.1.8 github.com/zealic/go2node v0.1.0 go.jetpack.io/pkg v0.0.0-20230920232528-54278537129b - golang.org/x/exp v0.0.0-20230807204917-050eac23e9de - golang.org/x/mod v0.11.0 - golang.org/x/sync v0.1.0 + golang.org/x/mod v0.12.0 + golang.org/x/sync v0.3.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 gopkg.in/yaml.v3 v3.0.1 ) @@ -51,29 +50,32 @@ require ( github.com/InVisionApp/go-logger v1.0.1 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/andybalholm/brotli v1.0.5 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 // indirect - github.com/aws/smithy-go v1.13.5 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 // indirect + github.com/aws/smithy-go v1.14.2 // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect + github.com/bodgit/plumbing v1.2.0 // indirect + github.com/bodgit/sevenzip v1.3.0 // indirect + github.com/bodgit/windows v1.0.0 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/codeclysm/extract v2.2.0+incompatible // indirect + github.com/connesc/cipherio v0.2.1 // indirect github.com/coreos/go-oidc/v3 v3.6.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dsnet/compress v0.0.1 // indirect - github.com/f1bonacc1/process-compose v0.43.1 github.com/go-jose/go-jose/v3 v3.0.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -85,26 +87,31 @@ require ( github.com/gosimple/unidecode v1.0.1 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/h2non/filetype v1.1.3 // indirect + github.com/hashicorp/errwrap v1.0.0 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/juju/errors v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/klauspost/compress v1.16.3 // indirect + github.com/klauspost/compress v1.16.0 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect + github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect github.com/nwaples/rardecode/v2 v2.0.0-beta.2 // indirect github.com/peterbourgon/diskv v2.0.1+incompatible // indirect - github.com/pierrec/lz4/v4 v4.1.17 // indirect + github.com/pierrec/lz4/v4 v4.1.15 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/zerolog v1.29.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/segmentio/backo-go v1.0.1 // indirect github.com/therootcompany/xz v1.0.1 // indirect - github.com/ulikunitz/xz v0.5.11 // indirect + github.com/ulikunitz/xz v0.5.10 // indirect github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect + go4.org v0.0.0-20200411211856-f5505b9728dd // indirect golang.org/x/crypto v0.13.0 // indirect + golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect golang.org/x/net v0.15.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect golang.org/x/sys v0.12.0 // indirect diff --git a/go.sum b/go.sum index b41f1f570a4..02daf05a7a8 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,24 @@ -github.com/AlecAivazis/survey/v2 v2.3.6 h1:NvTuVHISgTHEHeBFqt6BHOe4Ny/NwGZr7w+F8S9ziyw= -github.com/AlecAivazis/survey/v2 v2.3.6/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= +github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DATA-DOG/go-sqlmock v1.3.3 h1:CWUqKXe0s8A2z6qCgkP4Kru7wC11YoAnoupUKFDnH08= github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/InVisionApp/go-health/v2 v2.1.3 h1:PCMJAp+W5fynmBBmx/ovM44eG5w97NhXcea8O7lLso4= @@ -13,56 +32,62 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDe github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= -github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/aws/aws-sdk-go-v2 v1.18.0 h1:882kkTpSFhdgYRKVZ/VCgf7sd0ru57p2JCxz4/oN5RY= -github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= -github.com/aws/aws-sdk-go-v2/config v1.18.25 h1:JuYyZcnMPBiFqn87L2cRppo+rNwgah6YwD3VuyvaW6Q= -github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24 h1:PjiYyls3QdCrzqUN35jMWtUK1vqVZ+zLfdOa/UPFDp0= -github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3 h1:jJPgroehGvjrde3XufFIJUZVK5A2L9a3KwSFgKy9n8w= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67 h1:fI9/5BDEaAv/pv1VO1X1n3jfP9it+IGqWsCuuBQI8wM= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.67/go.mod h1:zQClPRIwQZfJlZq6WZve+s4Tb4JW+3V6eS+4+KrYeP8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33 h1:kG5eQilShqmJbv11XL1VpyDbaEJzWxd4zRiCG30GSn4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27 h1:vFQlirhuM8lLlpI7imKOMsjdQLuN9CPi+k44F/OFVsk= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34 h1:gGLG7yKaXG02/jBlg210R7VgQIotiQntNhsCFejawx8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25 h1:AzwRi5OKKwo4QNqPf7TjeO+tK8AyOK3GVSwmRPo7/Cs= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.25/go.mod h1:SUbB4wcbSEyCvqBxv/O/IBf93RbEze7U7OnoTlpPB+g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28 h1:vGWm5vTpMr39tEZfQeDiDAMgk+5qsnvRny3FjLpnH5w= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.28/go.mod h1:spfrICMD6wCAhjhzHuy6DOZZ+LAIY10UxhUmLzpJTTs= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27 h1:0iKliEXAcCa2qVtRs7Ot5hItA2MsufrphbRFlz1Owxo= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2 h1:NbWkRxEEIRSCqxhsHQuMiTH7yo+JZW1gp8v3elSVMTQ= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.2/go.mod h1:4tfW5l4IAB32VWCDEBxCRtR9T4BWy4I4kr1spr8NgZM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1 h1:O+9nAy9Bb6bJFTpeNFtd9UfHbgxO1o4ZDAM9rQp5NsY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.33.1/go.mod h1:J9kLNzEiHSeGMyN7238EjJmBpCniVzFda75Gxl/NqB8= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10 h1:UBQjaMTCKwyUYwiVnUt6toEJwGXsLBI6al083tpjJzY= -github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10 h1:PkHIIJs8qvq0e5QybnZoG1K/9QTrLr9OsqCIo59jOBA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0 h1:2DQLAKDteoEDI8zpCzqBMaZlJuoE9iTYD0gFmXVax9E= -github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= -github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/aws-sdk-go-v2 v1.21.0 h1:gMT0IW+03wtYJhRqTVYn0wLzwdnK9sRMcxmtfGzRdJc= +github.com/aws/aws-sdk-go-v2 v1.21.0/go.mod h1:/RfNgGmRxI+iFOB1OeJUyxiU+9s88k3pfHvDagGEp0M= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13 h1:OPLEkmhXf6xFPiz0bLeDArZIDx1NNS4oJyG4nv3Gct0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.13/go.mod h1:gpAbvyDGQFozTEmlTFO8XcQKHzubdq0LzRyJpG6MiXM= +github.com/aws/aws-sdk-go-v2/config v1.18.42 h1:28jHROB27xZwU0CB88giDSjz7M1Sba3olb5JBGwina8= +github.com/aws/aws-sdk-go-v2/config v1.18.42/go.mod h1:4AZM3nMMxwlG+eZlxvBKqwVbkDLlnN2a4UGTL6HjaZI= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40 h1:s8yOkDh+5b1jUDhMBtngF6zKWLDs84chUk2Vk0c38Og= +github.com/aws/aws-sdk-go-v2/credentials v1.13.40/go.mod h1:VtEHVAAqDWASwdOqj/1huyT6uHbs5s8FUHfDQdky/Rs= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11 h1:uDZJF1hu0EVT/4bogChk8DyjSF6fof6uL/0Y26Ma7Fg= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.11/go.mod h1:TEPP4tENqBGO99KwVpV9MlOX4NSrSLP8u3KRy2CDwA8= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.87 h1:e20ZrsgDPUXqg8+rZVuPwNSp6yniUN2Yr2tzFZ+Yvl0= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.87/go.mod h1:0i0TAT6W+5i48QTlDU2KmY6U2hBZeY/LCP0wktya2oc= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41 h1:22dGT7PneFMx4+b3pz7lMTRyN8ZKH7M2cW4GP9yUS2g= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.41/go.mod h1:CrObHAuPneJBlfEJ5T3szXOUkLEThaGfvnhTf33buas= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35 h1:SijA0mgjV8E+8G45ltVHs0fvKpTj8xmZJ3VwhGKtUSI= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.35/go.mod h1:SJC1nEVVva1g3pHAIdCp7QsRIkMmLAgoDquQ9Rr8kYw= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43 h1:g+qlObJH4Kn4n21g69DjspU0hKTjWtq7naZ9OLCv0ew= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.43/go.mod h1:rzfdUlfA+jdgLDmPKjd3Chq9V7LVLYo1Nz++Wb91aRo= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4 h1:6lJvvkQ9HmbHZ4h/IEwclwv2mrTW8Uq1SOB/kXy0mfw= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.1.4/go.mod h1:1PrKYwxTM+zjpw9Y41KFtoJCQrJ34Z47Y4VgVbfndjo= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14 h1:m0QTSI6pZYJTk5WSKx3fm5cNW/DCicVzULBgU/6IyD0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.14/go.mod h1:dDilntgHy9WnHXsh7dDtUPgHKEfTJIBUTHM8OWm0f/0= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36 h1:eev2yZX7esGRjqRbnVk1UxMLw4CyVZDpZXRCcy75oQk= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.36/go.mod h1:lGnOkH9NJATw0XEPcAknFBj3zzNTEGRHtSw+CwC1YTg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35 h1:CdzPW9kKitgIiLV1+MHobfR5Xg25iYnyzWZhyQuSlDI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.35/go.mod h1:QGF2Rs33W5MaN9gYdEQOBBFPLwTZkEhRwI33f7KIG0o= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4 h1:v0jkRigbSD6uOdwcaUQmgEwG1BkPfAPDqaeNt/29ghg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.15.4/go.mod h1:LhTyt8J04LL+9cIt7pYJ5lbS/U98ZmXovLOR/4LUsk8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0 h1:wl5dxN1NONhTDQD9uaEvNsDRX29cBmGED/nl0jkWlt4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.40.0/go.mod h1:rDGMZA7f4pbmTtPOk5v5UM2lmX6UAbRnMDJeDvnH7AM= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1 h1:YkNzx1RLS0F5qdf9v1Q8Cuv9NXCL2TkosOxhzlUPV64= +github.com/aws/aws-sdk-go-v2/service/sso v1.14.1/go.mod h1:fIAwKQKBFu90pBxx07BFOMJLpRUGu8VOzLJakeY+0K4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1 h1:8lKOidPkmSmfUtiTgtdXWgaKItCZ/g75/jEk6Ql6GsA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.1/go.mod h1:yygr8ACQRY2PrEcy3xsUI357stq2AxnFM6DIsR9lij4= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0 h1:s4bioTgjSFRwOoyEFzAVCmFmoowBgjTR8gkrF/sQ4wk= +github.com/aws/aws-sdk-go-v2/service/sts v1.22.0/go.mod h1:VC7JDqsqiwXukYEDjoHh9U0fOJtNWh04FPQz4ct4GGU= +github.com/aws/smithy-go v1.14.2 h1:MJU9hqBGbvWZdApzpvoF2WAIJDbtjK2NDJSiJP7HblQ= +github.com/aws/smithy-go v1.14.2/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xWbdbCW3pNTGyYg= github.com/bmatcuk/doublestar/v4 v4.6.0 h1:HTuxyug8GyFbRkrffIpzNCSK4luc0TY3wzXvzIZhEXc= github.com/bmatcuk/doublestar/v4 v4.6.0/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bodgit/plumbing v1.2.0 h1:gg4haxoKphLjml+tgnecR4yLBV5zo4HAZGCtAh3xCzM= +github.com/bodgit/plumbing v1.2.0/go.mod h1:b9TeRi7Hvc6Y05rjm8VML3+47n4XTZPtQ/5ghqic2n8= +github.com/bodgit/sevenzip v1.3.0 h1:1ljgELgtHqvgIp8W8kgeEGHIWP4ch3xGI8uOBZgLVKY= +github.com/bodgit/sevenzip v1.3.0/go.mod h1:omwNcgZTEooWM8gA/IJ2Nk/+ZQ94+GsytRzOJJ8FBlM= +github.com/bodgit/windows v1.0.0 h1:rLQ/XjsleZvx4fR1tB/UxQrK+SJ2OFHzfPjLWWOhDIA= +github.com/bodgit/windows v1.0.0/go.mod h1:a6JLwrB4KrTR5hBpp8FI9/9W9jJfeQ2h4XDXU74ZCdM= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= github.com/briandowns/spinner v1.23.0 h1:alDF2guRWqa/FOZZYWjlMIx2L6H0wyewPxo/CH4Pt2A= @@ -72,9 +97,11 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2 github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cavaliergopher/grab/v3 v3.0.1 h1:4z7TkBfmPjmLAAmkkAZNX/6QJ1nNFdv3SdIHXju0Fr4= github.com/cavaliergopher/grab/v3 v3.0.1/go.mod h1:1U/KNnD+Ft6JJiYoYBAimKH2XrYptb8Kl3DFGmsjpq4= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/ahocorasick v0.0.0-20210425175752-730270c3e184 h1:8yL+85JpbwrIc6m+7N1iYrjn/22z68jwrTIBOJHNe4k= github.com/cloudflare/ahocorasick v0.0.0-20210425175752-730270c3e184/go.mod h1:tGWUZLZp9ajsxUOnHmFFLnqnlKXsCn6GReG4jAD59H0= github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= @@ -82,6 +109,8 @@ github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEM github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/codeclysm/extract v2.2.0+incompatible h1:q3wyckoA30bhUSiwdQezMqVhwd8+WGE64/GL//LtUhI= github.com/codeclysm/extract v2.2.0+incompatible/go.mod h1:2nhFMPHiU9At61hz+12bfrlpXSUrOnK+wR+KlGO4Uks= +github.com/connesc/cipherio v0.2.1 h1:FGtpTPMbKNNWByNrr9aEBtaJtXjqOzkIXNYJp6OEycw= +github.com/connesc/cipherio v0.2.1/go.mod h1:ukY0MWJDFnJEbXMQtOcn2VmTpRfzcTz4OoVrWGGJZcA= github.com/coreos/go-oidc/v3 v3.6.0 h1:AKVxfYw1Gmkn/w96z0DbT/B/xFnzTd3MkZvWLjF4n/o= github.com/coreos/go-oidc/v3 v3.6.0/go.mod h1:ZpHUsHBucTUj6WOkrP4E20UPynbLZzhTQ1XKCXkxyPc= github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -99,6 +128,8 @@ github.com/denisbrodbeck/machineid v1.0.1/go.mod h1:dJUwb7PTidGDeYyUBmXZ2GphQBbj github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/f1bonacc1/process-compose v0.43.1 h1:XAN7ohegNfMFxYnj59g2jN7y6HfnJWhDCGtD/nN/TbE= github.com/f1bonacc1/process-compose v0.43.1/go.mod h1:jvg1NakjJd8V1LjGKu21HLLOVxbwkOHEgkaDjSWRXc0= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= @@ -106,26 +137,46 @@ github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBD github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getsentry/sentry-go v0.20.0 h1:bwXW98iMRIWxn+4FgPW7vMrjmbym6HblXALmhjHmQaQ= -github.com/getsentry/sentry-go v0.20.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.24.1 h1:W6/0GyTy8J6ge6lVCc94WB6Gx2ZuLrgopnn9w8Hiwuk= +github.com/getsentry/sentry-go v0.24.1/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-jose/go-jose/v3 v3.0.0 h1:s6rrhirfEP/CGIoc6p+PZAeogN2SxKav6Wp7+dyMWVo= github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/go-redis/redis v6.15.5+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3 h1:GV+pQPG/EUUbkh47niozDcADz6go/dUwhVzdUQHIVRw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -136,10 +187,17 @@ github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/ github.com/google/go-github/v53 v53.2.0/go.mod h1:XhFRObz+m/l+UCm9b7KSIC3lT3NWSXGt7mOsAWEloao= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gosimple/slug v1.13.1 h1:bQ+kpX9Qa6tHRaK+fZR0A0M2Kd7Pa5eHPPsb1JpHD+Q= github.com/gosimple/slug v1.13.1/go.mod h1:UiRaFH+GEilHstLUmcBgWcI42viBN7mAb818JrYOeFQ= github.com/gosimple/unidecode v1.0.1 h1:hZzFTMMqSswvf0LBJZCZgThIZrpDHFXux9KeGmn6T/o= @@ -148,12 +206,19 @@ github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJr github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= +github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-envparse v0.1.0 h1:bE++6bhIsNCPLvgDZkYqo3nA+/PFI51pkrHdmPSDFPY= github.com/hashicorp/go-envparse v0.1.0/go.mod h1:OHheN1GoygLlAkTlXLXvAdnXdZxy8JUweQ1rAXx1xnc= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= @@ -163,19 +228,25 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/juju/errors v1.0.0 h1:yiq7kjCLll1BiaRuNY53MGI0+EQ3rF6GB+wvboZDefM= github.com/juju/errors v1.0.0/go.mod h1:B5x9thDqx0wIMH3+aLIMP9HjItInYWObRovoCFM5Qe8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -189,23 +260,22 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI= -github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/mholt/archiver/v4 v4.0.0-alpha.7 h1:xzByj8G8tj0Oq7ZYYU4+ixL/CVb5ruWCm0EZQ1PjOkE= -github.com/mholt/archiver/v4 v4.0.0-alpha.7/go.mod h1:Fs8qUkO74HHaidabihzYephJH8qmGD/nCP6tE5xC9BM= +github.com/mholt/archiver/v4 v4.0.0-alpha.8 h1:tRGQuDVPh66WCOelqe6LIGh0gwmfwxUrSSDunscGsRM= +github.com/mholt/archiver/v4 v4.0.0-alpha.8/go.mod h1:5f7FUYGXdJWUjESffJaYR4R60VhnHxb2X3T1teMyv5A= github.com/nwaples/rardecode/v2 v2.0.0-beta.2 h1:e3mzJFJs4k83GXBEiTaQ5HgSc/kOK8q0rDaRO0MPaOk= github.com/nwaples/rardecode/v2 v2.0.0-beta.2/go.mod h1:yntwv/HfMc/Hbvtq9I19D1n58te3h6KsqCf3GxyfBGY= github.com/onsi/ginkgo v1.6.0 h1:Ix8l273rp3QzYgXSR+c8d1fTG7UPgYkOSELPhiY/YGw= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= -github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= +github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/peterbourgon/diskv v2.0.1+incompatible h1:UBdAOUP5p4RWqPBg048CAvpKN+vxiaj6gdUUzhl4XmI= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= -github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0= +github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= @@ -214,6 +284,8 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= @@ -221,6 +293,7 @@ github.com/rs/zerolog v1.29.0 h1:Zes4hju04hjbvkVkOhdl2HpZa+0PmVwigmo8XoORE5w= github.com/rs/zerolog v1.29.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd/go.mod h1:hPqNNc0+uJM6H+SuU8sEs5K5IQeKccPqeSjfgcKGgPk= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/segmentio/analytics-go v3.1.0+incompatible h1:IyiOfUgQFVHvsykKKbdI7ZsH374uv3/DfZUo9+G0Z80= @@ -245,84 +318,222 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/therootcompany/xz v1.0.1 h1:CmOtsn1CbtmyYiusbfmhmkpAAETj0wBIH6kCYaX+xzw= github.com/therootcompany/xz v1.0.1/go.mod h1:3K3UH1yCKgBneZYhuQUvJ9HPD19UEXEI0BWbMn8qNMY= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= -github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= -github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/wk8/go-ordered-map/v2 v2.1.8 h1:5h/BUHu93oj4gIdvHHHGsScSTMijfx5PeYkE/fJgbpc= github.com/wk8/go-ordered-map/v2 v2.1.8/go.mod h1:5nJHM5DyteebpVlHnWMV0rPz6Zp7+xBAnxjb1X5vnTw= github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c h1:3lbZUMbMiGUW/LMkfsEABsc5zNT9+b1CvsJx47JzJ8g= github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c/go.mod h1:UrdRz5enIKZ63MEE3IF9l2/ebyx59GyGgPi+tICQdmM= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036/go.mod h1:gqRgreBUhTSL0GeU64rtZ3Uq3wtjOa/TB2YfrtkCbVQ= github.com/zaffka/mongodb-boltdb-mock v0.0.0-20221014194232-b4bb03fbe3a0/go.mod h1:GsDD1qsG+86MeeCG7ndi6Ei3iGthKL3wQ7PTFigDfNY= github.com/zealic/go2node v0.1.0 h1:ofxpve08cmLJBwFdI0lPCk9jfwGWOSD+s6216x0oAaA= github.com/zealic/go2node v0.1.0/go.mod h1:GrkFr+HctXwP7vzcU9RsgtAeJjTQ6Ud0IPCQAqpTfBg= go.jetpack.io/pkg v0.0.0-20230920232528-54278537129b h1:8sbFeLQ7GtVP7CxvpmBoOh6w2ZTK4DyZuMkyiIGFdjs= go.jetpack.io/pkg v0.0.0-20230920232528-54278537129b/go.mod h1:drBQ4v8Hxs501Y3KK3vbsNBhn/TEMEDHrdXK7cOb9yg= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go4.org v0.0.0-20200411211856-f5505b9728dd h1:BNJlw5kRTzdmyfh5U8F93HA2OwkP7ZGwA51eJ/0wKOU= +go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZMZXMSBGhxRdsvzbkg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/exp v0.0.0-20230807204917-050eac23e9de h1:l5Za6utMv/HsBWWqzt4S8X17j+kt1uVETUX5UFhn2rE= -golang.org/x/exp v0.0.0-20230807204917-050eac23e9de/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 h1:3MTrJm4PyNL9NBqvYDSj3DHl46qQakyfqfWo4jgfaEM= +golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4= golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= @@ -337,3 +548,11 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/boxcli/auth.go b/internal/boxcli/auth.go index a881d1e8ee2..63ea14dd79a 100644 --- a/internal/boxcli/auth.go +++ b/internal/boxcli/auth.go @@ -13,8 +13,10 @@ import ( "go.jetpack.io/pkg/sandbox/auth/session" ) -var issuer = envir.GetValueOrDefault("DEVBOX_AUTH_ISSUER", "https://accounts.jetpack.io") -var clientID = envir.GetValueOrDefault("DEVBOX_AUTH_CLIENT_ID", "ff3d4c9c-1ac8-42d9-bef1-f5218bb1a9f6") +var ( + issuer = envir.GetValueOrDefault("DEVBOX_AUTH_ISSUER", "https://accounts.jetpack.io") + clientID = envir.GetValueOrDefault("DEVBOX_AUTH_CLIENT_ID", "ff3d4c9c-1ac8-42d9-bef1-f5218bb1a9f6") +) func authCmd() *cobra.Command { cmd := &cobra.Command{ diff --git a/internal/boxcli/gen-docs.go b/internal/boxcli/gen-docs.go index 62ebd040fcb..3ab063fbc54 100644 --- a/internal/boxcli/gen-docs.go +++ b/internal/boxcli/gen-docs.go @@ -15,7 +15,7 @@ import ( ) func genDocsCmd() *cobra.Command { - var genDocsCmd = &cobra.Command{ + genDocsCmd := &cobra.Command{ Use: "gen-docs ", Short: "[Internal] Generate documentation for the CLI", Long: "[Internal] Generates the documentation for the CLI's Cobra commands. " + diff --git a/internal/boxcli/global.go b/internal/boxcli/global.go index 20bc3b2de1d..17ace55e036 100644 --- a/internal/boxcli/global.go +++ b/internal/boxcli/global.go @@ -45,7 +45,7 @@ func globalCmd() *cobra.Command { return globalCmd } -func addCommandAndHideConfigFlag(parent *cobra.Command, child *cobra.Command) { +func addCommandAndHideConfigFlag(parent, child *cobra.Command) { parent.AddCommand(child) _ = child.Flags().MarkHidden("config") } diff --git a/internal/boxcli/run.go b/internal/boxcli/run.go index e370864bf24..d36f9384927 100644 --- a/internal/boxcli/run.go +++ b/internal/boxcli/run.go @@ -6,13 +6,13 @@ package boxcli import ( "fmt" "os" + "slices" "strconv" "strings" "github.com/samber/lo" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/exp/slices" "go.jetpack.io/devbox" "go.jetpack.io/devbox/internal/boxcli/usererr" diff --git a/internal/cloud/cloud.go b/internal/cloud/cloud.go index 5116e63e79a..c681c89d532 100644 --- a/internal/cloud/cloud.go +++ b/internal/cloud/cloud.go @@ -87,7 +87,7 @@ func ensureVMForUser(vmHostname string, w io.Writer, username string, sshCmd *op return vmHostname, nil } -func Shell(ctx context.Context, w io.Writer, projectDir string, githubUsername string) error { +func Shell(ctx context.Context, w io.Writer, projectDir, githubUsername string) error { color.New(color.FgMagenta, color.Bold).Fprint(w, "Devbox Cloud\n") fmt.Fprint(w, "Remote development environments powered by Nix\n\n") fmt.Fprint(w, "This is an open developer preview and may have some rough edges. Please report any issues to https://github.com/jetpack-io/devbox/issues\n\n") @@ -495,7 +495,7 @@ func absoluteProjectPathInVM(sshUser, relativeProjectPath string) string { return fmt.Sprintf("%s/%s/", vmHomeDir, relativeProjectPath) } -func parseVMEnvVar() (username string, vmHostname string) { +func parseVMEnvVar() (username, vmHostname string) { vmEnvVar := os.Getenv(envir.DevboxVM) if vmEnvVar == "" { return "", "" diff --git a/internal/cloud/mutagen/forward.go b/internal/cloud/mutagen/forward.go index c41ae846e31..36086183627 100644 --- a/internal/cloud/mutagen/forward.go +++ b/internal/cloud/mutagen/forward.go @@ -28,12 +28,12 @@ func ForwardCreate(env map[string]string, local, remote string, labels map[strin return execMutagenEnv(append(args, labelFlag(labels)...), env) } -func ForwardTerminate(env map[string]string, labels map[string]string) error { +func ForwardTerminate(env, labels map[string]string) error { args := []string{"forward", "terminate"} return execMutagenEnv(append(args, labelSelectorFlag(labels)...), env) } -func ForwardList(env map[string]string, labels map[string]string) ([]Forward, error) { +func ForwardList(env, labels map[string]string) ([]Forward, error) { args := []string{"forward", "list", "--template", "{{json .}}"} out, err := execMutagenOut(append(args, labelSelectorFlag(labels)...), env) if err != nil { diff --git a/internal/cloud/mutagen/install.go b/internal/cloud/mutagen/install.go index 967cc33a505..562986c0aa9 100644 --- a/internal/cloud/mutagen/install.go +++ b/internal/cloud/mutagen/install.go @@ -30,9 +30,9 @@ func InstallMutagenOnce(binPath string) error { return Install(url, installDir) } -func Install(url string, installDir string) error { +func Install(url, installDir string) error { debug.Log("installing mutagen from %s to %s", url, installDir) - err := os.MkdirAll(installDir, 0755) + err := os.MkdirAll(installDir, 0o755) if err != nil { return err } diff --git a/internal/cloud/mutagen/wrapper.go b/internal/cloud/mutagen/wrapper.go index c40b0aec83b..1782e54b064 100644 --- a/internal/cloud/mutagen/wrapper.go +++ b/internal/cloud/mutagen/wrapper.go @@ -72,7 +72,6 @@ func List(envVars map[string]string, names ...string) ([]Session, error) { debugPrintExecCmd(cmd) out, err := cmd.CombinedOutput() - if err != nil { debug.Log("List error: %s, and out: %s", err, string(out)) if e := (&exec.ExitError{}); errors.As(err, &e) { @@ -119,7 +118,7 @@ func Reset(envVars map[string]string, names ...string) error { return execMutagenEnv(args, envVars) } -func Terminate(env map[string]string, labels map[string]string, names ...string) error { +func Terminate(env, labels map[string]string, names ...string) error { args := []string{"sync", "terminate"} for k, v := range labels { diff --git a/internal/cloud/mutagenbox/mutagenbox.go b/internal/cloud/mutagenbox/mutagenbox.go index 242c960c051..bdd5ecba539 100644 --- a/internal/cloud/mutagenbox/mutagenbox.go +++ b/internal/cloud/mutagenbox/mutagenbox.go @@ -65,5 +65,5 @@ func createAndGetDataDir() (string, error) { } path := filepath.Join(home, dataDirPath) - return path, errors.WithStack(os.MkdirAll(path, 0700)) + return path, errors.WithStack(os.MkdirAll(path, 0o700)) } diff --git a/internal/cloud/openssh/config.go b/internal/cloud/openssh/config.go index f5cb5fe850d..b9a2298637e 100644 --- a/internal/cloud/openssh/config.go +++ b/internal/cloud/openssh/config.go @@ -67,7 +67,7 @@ func setupDevbox(debugHost string, debugPort int) error { _ = os.Remove(devboxKnownHostsDebug) devboxKnownHostsPath := filepath.Join(devboxSSHDir, "known_hosts") - devboxKnownHosts, err := editFile(devboxKnownHostsPath, 0644) + devboxKnownHosts, err := editFile(devboxKnownHostsPath, 0o644) if err != nil { return err } @@ -80,7 +80,7 @@ func setupDevbox(debugHost string, debugPort int) error { } devboxIncludePath := filepath.Join(devboxSSHDir, "config") - devboxSSHConfig, err := editFile(devboxIncludePath, 0644) + devboxSSHConfig, err := editFile(devboxIncludePath, 0o644) if err != nil { return err } @@ -114,7 +114,7 @@ func setupDevbox(debugHost string, debugPort int) error { // debug gateway is configured. It's okay if this fails because it's // only used for debugging. if debugHost != "" { - f, err := os.OpenFile(devboxKnownHostsDebug, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644) + f, err := os.OpenFile(devboxKnownHostsDebug, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0o644) if err == nil { f.Close() } @@ -133,7 +133,7 @@ func AddVMKey(hostname, key string) error { if err != nil { return err } - keyFile, err := editFile(filepath.Join(keysDir, hostname), 0600) + keyFile, err := editFile(filepath.Join(keysDir, hostname), 0o600) if err != nil { return err } @@ -151,11 +151,11 @@ func updateUserSSHConfig(devboxIncludePath string) (err error) { return errors.WithStack(err) } dotSSH := filepath.Join(home, ".ssh") - if err := EnsureDirExists(dotSSH, 0700, true); err != nil { + if err := EnsureDirExists(dotSSH, 0o700, true); err != nil { return err } - sshConfig, err := editFile(filepath.Join(dotSSH, "config"), 0644) + sshConfig, err := editFile(filepath.Join(dotSSH, "config"), 0o644) if err != nil { return err } @@ -225,19 +225,19 @@ func devboxSSHDir() (string, error) { // Ensure ~/.config exists but don't touch existing permissions. dotConfig := filepath.Join(home, ".config") - if err := EnsureDirExists(dotConfig, 0755, false); err != nil { + if err := EnsureDirExists(dotConfig, 0o755, false); err != nil { return "", err } // Ensure ~/.config/devbox exists and force permissions to 0755. devboxConfigDir := filepath.Join(dotConfig, "devbox") - if err := EnsureDirExists(devboxConfigDir, 0755, true); err != nil { + if err := EnsureDirExists(devboxConfigDir, 0o755, true); err != nil { return "", err } // Ensure ~/.config/devbox/ssh exists and force permissions to 0700. devboxSSHDir := filepath.Join(devboxConfigDir, "ssh") - if err := EnsureDirExists(devboxSSHDir, 0700, true); err != nil { + if err := EnsureDirExists(devboxSSHDir, 0o700, true); err != nil { return "", err } return devboxSSHDir, nil @@ -249,7 +249,7 @@ func devboxKeysDir() (string, error) { return "", err } keysDir := filepath.Join(sshDir, "keys") - if err := EnsureDirExists(keysDir, 0700, true); err != nil { + if err := EnsureDirExists(keysDir, 0o700, true); err != nil { return "", err } return keysDir, nil @@ -261,7 +261,7 @@ func devboxSocketsDir() (string, error) { return "", err } sockets := filepath.Join(sshDir, "sockets") - if err := EnsureDirExists(sockets, 0700, true); err != nil { + if err := EnsureDirExists(sockets, 0o700, true); err != nil { return "", err } return sockets, nil diff --git a/internal/cloud/openssh/config_test.go b/internal/cloud/openssh/config_test.go index 817eb65613c..554816db15d 100644 --- a/internal/cloud/openssh/config_test.go +++ b/internal/cloud/openssh/config_test.go @@ -79,23 +79,23 @@ var goldenDevboxSSHConfig []byte func TestSetupDevbox(t *testing.T) { want := fstest.MapFS{ - ".config": &fstest.MapFile{Mode: fs.ModeDir | 0755}, - ".config/devbox": &fstest.MapFile{Mode: fs.ModeDir | 0755}, - ".config/devbox/ssh": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".config": &fstest.MapFile{Mode: fs.ModeDir | 0o755}, + ".config/devbox": &fstest.MapFile{Mode: fs.ModeDir | 0o755}, + ".config/devbox/ssh": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, ".config/devbox/ssh/config": &fstest.MapFile{ Data: goldenDevboxSSHConfig, - Mode: 0644, + Mode: 0o644, }, ".config/devbox/ssh/known_hosts": &fstest.MapFile{ Data: sshKnownHosts, - Mode: 0644, + Mode: 0o644, }, - ".config/devbox/ssh/sockets": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".config/devbox/ssh/sockets": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, - ".ssh": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".ssh": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, ".ssh/config": &fstest.MapFile{ Data: []byte("Include \"$HOME/.config/devbox/ssh/config\"\n"), - Mode: 0644, + Mode: 0o644, }, } @@ -112,10 +112,10 @@ func TestSetupDevbox(t *testing.T) { t.Run("ExistingSSHConfig", func(t *testing.T) { existingSSHConfig := []byte("Host example.com\n\tUser example\n\tPort 1234\n") input := fstest.MapFS{ - ".ssh": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".ssh": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, ".ssh/config": &fstest.MapFile{ Data: existingSSHConfig, - Mode: 0644, + Mode: 0o644, }, } // Temporarily change the desired ~/.ssh/config so it contains @@ -128,7 +128,7 @@ func TestSetupDevbox(t *testing.T) { []byte("Include \"$HOME/.config/devbox/ssh/config\"\n"), existingSSHConfig..., ), - Mode: 0644, + Mode: 0o644, } workdir := fsToDir(t, input) @@ -157,24 +157,24 @@ var goldenDevboxSSHDebugConfig []byte func TestSetupInsecureDebug(t *testing.T) { wantAddr := "127.0.0.1:2222" want := fstest.MapFS{ - ".config": &fstest.MapFile{Mode: fs.ModeDir | 0755}, - ".config/devbox": &fstest.MapFile{Mode: fs.ModeDir | 0755}, - ".config/devbox/ssh": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".config": &fstest.MapFile{Mode: fs.ModeDir | 0o755}, + ".config/devbox": &fstest.MapFile{Mode: fs.ModeDir | 0o755}, + ".config/devbox/ssh": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, ".config/devbox/ssh/config": &fstest.MapFile{ Data: goldenDevboxSSHDebugConfig, - Mode: 0644, + Mode: 0o644, }, ".config/devbox/ssh/known_hosts": &fstest.MapFile{ Data: sshKnownHosts, - Mode: 0644, + Mode: 0o644, }, - ".config/devbox/ssh/known_hosts_debug": &fstest.MapFile{Mode: 0644}, - ".config/devbox/ssh/sockets": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".config/devbox/ssh/known_hosts_debug": &fstest.MapFile{Mode: 0o644}, + ".config/devbox/ssh/sockets": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, - ".ssh": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".ssh": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, ".ssh/config": &fstest.MapFile{ Data: []byte("Include \"$HOME/.config/devbox/ssh/config\"\n"), - Mode: 0644, + Mode: 0o644, }, } @@ -198,14 +198,14 @@ func TestSetupInsecureDebug(t *testing.T) { // can check that it gets changed back to 127.0.0.1. input[".config/devbox/ssh/config"] = &fstest.MapFile{ Data: bytes.ReplaceAll(goldenDevboxSSHDebugConfig, []byte("127.0.0.1"), []byte("127.0.0.2")), - Mode: 0644, + Mode: 0o644, } // Put something in known_hosts_debug so we can check that it // gets cleared out. input[".config/devbox/ssh/known_hosts_debug"] = &fstest.MapFile{ Data: []byte("[127.0.0.1]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPY1ms2jt+QPvhq89J8KF7rfTCFUi6X6Ik4O9EIAT/c\n"), - Mode: 0644, + Mode: 0o644, } workdir := fsToDir(t, input) @@ -225,14 +225,14 @@ func TestAddVMKey(t *testing.T) { host := "test.vm.devbox-vms.internal" input := fstest.MapFS{} want := fstest.MapFS{ - ".config": &fstest.MapFile{Mode: fs.ModeDir | 0755}, - ".config/devbox": &fstest.MapFile{Mode: fs.ModeDir | 0755}, - ".config/devbox/ssh": &fstest.MapFile{Mode: fs.ModeDir | 0700}, - ".config/devbox/ssh/keys": &fstest.MapFile{Mode: fs.ModeDir | 0700}, + ".config": &fstest.MapFile{Mode: fs.ModeDir | 0o755}, + ".config/devbox": &fstest.MapFile{Mode: fs.ModeDir | 0o755}, + ".config/devbox/ssh": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, + ".config/devbox/ssh/keys": &fstest.MapFile{Mode: fs.ModeDir | 0o700}, ".config/devbox/ssh/keys/" + host: &fstest.MapFile{ Data: goldenVMKey, - Mode: 0600, + Mode: 0o600, }, } @@ -300,7 +300,7 @@ func fsEqual(t *testing.T, got, want fs.FS) { // golden files with dynamic content. For example, a test can create an // fstest.MapFile with the data {"name": "$USER"} and compare it to some test // results to make sure there's a JSON file containing the current username. -func fsPathsEqual(t *testing.T, gotFS fs.FS, wantFS fs.FS, path string) { +func fsPathsEqual(t *testing.T, gotFS, wantFS fs.FS, path string) { t.Helper() gotInfo, err := fs.Stat(gotFS, path) diff --git a/internal/cloud/openssh/sshshim/generate.go b/internal/cloud/openssh/sshshim/generate.go index b60d0dce779..812161720ab 100644 --- a/internal/cloud/openssh/sshshim/generate.go +++ b/internal/cloud/openssh/sshshim/generate.go @@ -21,7 +21,7 @@ func Setup() error { return errors.WithStack(err) } - if err := openssh.EnsureDirExists(shimDir, 0744, true /*chmod*/); err != nil { + if err := openssh.EnsureDirExists(shimDir, 0o744, true /*chmod*/); err != nil { return err } @@ -41,7 +41,7 @@ func Setup() error { return errors.WithStack(makeSymlink(scpSymlink, devboxExecutablePath)) } -func makeSymlink(from string, target string) error { +func makeSymlink(from, target string) error { err := os.Remove(from) if err != nil && !errors.Is(err, fs.ErrNotExist) { return errors.WithStack(err) diff --git a/internal/cloud/openssh/username.go b/internal/cloud/openssh/username.go index 8dda607be13..f59086d9096 100644 --- a/internal/cloud/openssh/username.go +++ b/internal/cloud/openssh/username.go @@ -33,7 +33,7 @@ func SaveGithubUsernameToLocalFile(username string) error { return errors.WithStack(err) } - return errors.WithStack(os.WriteFile(filePath, []byte(username), 0600)) + return errors.WithStack(os.WriteFile(filePath, []byte(username), 0o600)) } func usernameFilePath() (string, error) { diff --git a/internal/cloud/user.go b/internal/cloud/user.go index 6bcdc56f35d..5d9948dafce 100644 --- a/internal/cloud/user.go +++ b/internal/cloud/user.go @@ -25,7 +25,6 @@ func queryGithubUsername() (string, error) { cmd.Stdout = &bufOut cmd.Stderr = &bufErr err := cmd.Run() - if err != nil { if e := (&exec.ExitError{}); errors.As(err, &e) && e.ExitCode() == 1 { // This is the Happy case, and we can parse out the error message diff --git a/internal/cloud/user_test.go b/internal/cloud/user_test.go index 7d90e6401a9..20798480dd2 100644 --- a/internal/cloud/user_test.go +++ b/internal/cloud/user_test.go @@ -14,7 +14,6 @@ func TestParseUsernameFromErrorMessage(t *testing.T) { username string }{ { - "success_case", "Hi myDearUsername! You've successfully authenticated, but GitHub does not provide shell access.", "myDearUsername", diff --git a/internal/cmdutil/cmdutil.go b/internal/cmdutil/cmdutil.go index 95a0cb06aaa..850a720f485 100644 --- a/internal/cmdutil/cmdutil.go +++ b/internal/cmdutil/cmdutil.go @@ -15,7 +15,7 @@ func Exists(command string) bool { // GetPathOrDefault gets the path for the given command. // If it's not found, it will return the given value instead. -func GetPathOrDefault(command string, def string) string { +func GetPathOrDefault(command, def string) string { path, err := exec.LookPath(command) if err != nil { path = def diff --git a/internal/cuecfg/cuecfg.go b/internal/cuecfg/cuecfg.go index 0951f7d590e..9858890a113 100644 --- a/internal/cuecfg/cuecfg.go +++ b/internal/cuecfg/cuecfg.go @@ -62,7 +62,7 @@ func ParseFile(path string, valuePtr any) error { // ParseFileWithExtension lets the caller override the extension of the `path` filename // For example, project.csproj files should be treated as having extension .xml -func ParseFileWithExtension(path string, ext string, valuePtr any) error { +func ParseFileWithExtension(path, ext string, valuePtr any) error { data, err := os.ReadFile(path) if err != nil { return errors.WithStack(err) @@ -77,7 +77,7 @@ func WriteFile(path string, value any) error { return errors.WithStack(err) } data = append(data, '\n') - return errors.WithStack(os.WriteFile(path, data, 0644)) + return errors.WithStack(os.WriteFile(path, data, 0o644)) } func IsSupportedExtension(ext string) bool { diff --git a/internal/devconfig/packages.go b/internal/devconfig/packages.go index de268fef0d0..8f969594f78 100644 --- a/internal/devconfig/packages.go +++ b/internal/devconfig/packages.go @@ -2,6 +2,7 @@ package devconfig import ( "encoding/json" + "slices" "github.com/pkg/errors" "github.com/samber/lo" @@ -9,7 +10,6 @@ import ( "go.jetpack.io/devbox/internal/boxcli/usererr" "go.jetpack.io/devbox/internal/nix" "go.jetpack.io/devbox/internal/searcher" - "golang.org/x/exp/slices" ) type jsonKind int @@ -138,7 +138,6 @@ func (pkgs *Packages) ExcludePlatforms(versionedName string, platforms []string) } func (pkgs *Packages) UnmarshalJSON(data []byte) error { - // First, attempt to unmarshal as a list of strings (legacy format) var packages []string if err := json.Unmarshal(data, &packages); err == nil { diff --git a/internal/devpkg/package.go b/internal/devpkg/package.go index c2b17f9d36c..848c7c82ddd 100644 --- a/internal/devpkg/package.go +++ b/internal/devpkg/package.go @@ -171,7 +171,6 @@ func (p *Package) IsInstallable() bool { // Installable for this package. Installable is a nix concept defined here: // https://nixos.org/manual/nix/stable/command-ref/new-cli/nix.html#installables func (p *Package) Installable() (string, error) { - inCache, err := p.IsInBinaryCache() if err != nil { return "", err @@ -438,7 +437,6 @@ func EnsureNixpkgsPrefetched(ctx context.Context, w io.Writer, pkgs []*Package) // ensureNixpkgsPrefetched should be called via the public EnsureNixpkgsPrefetched. // See function comment there. func (p *Package) ensureNixpkgsPrefetched(w io.Writer) error { - inCache, err := p.IsInBinaryCache() if err != nil { return err diff --git a/internal/fileutil/dir.go b/internal/fileutil/dir.go index 2063ee5e12e..aaf4ee30ec6 100644 --- a/internal/fileutil/dir.go +++ b/internal/fileutil/dir.go @@ -35,7 +35,7 @@ func ClearDir(dir string) error { if err == nil { mode = f.Mode() } else if errors.Is(err, fs.ErrNotExist) { - mode = 0755 + mode = 0o755 } else { return errors.WithStack(err) } diff --git a/internal/fileutil/fileutil.go b/internal/fileutil/fileutil.go index 152442092f7..6074ca0bdac 100644 --- a/internal/fileutil/fileutil.go +++ b/internal/fileutil/fileutil.go @@ -51,7 +51,7 @@ func Exists(path string) bool { } // FileContains checks if a given file at 'path' contains the 'substring' -func FileContains(path string, substring string) (bool, error) { +func FileContains(path, substring string) (bool, error) { data, err := os.ReadFile(path) if err != nil { return false, err diff --git a/internal/fileutil/untar.go b/internal/fileutil/untar.go index d2be278e011..52f8913a74a 100644 --- a/internal/fileutil/untar.go +++ b/internal/fileutil/untar.go @@ -42,7 +42,7 @@ func Untar(archive io.Reader, destPath string) error { case mode.IsRegular(): return untarFile(fromFile, abs) case mode.IsDir(): - return os.MkdirAll(abs, 0755) + return os.MkdirAll(abs, 0o755) default: return fmt.Errorf("archive contained entry %s of unsupported file type %v", fromFile.Name(), mode) } diff --git a/internal/impl/devbox.go b/internal/impl/devbox.go index 39ba1434bd1..6002c394563 100644 --- a/internal/impl/devbox.go +++ b/internal/impl/devbox.go @@ -13,6 +13,7 @@ import ( "os/exec" "path/filepath" "runtime/trace" + "slices" "strconv" "strings" "text/tabwriter" @@ -24,7 +25,6 @@ import ( "go.jetpack.io/devbox/internal/searcher" "go.jetpack.io/devbox/internal/shellgen" "go.jetpack.io/devbox/internal/telemetry" - "golang.org/x/exp/slices" "go.jetpack.io/devbox/internal/boxcli/usererr" "go.jetpack.io/devbox/internal/cmdutil" diff --git a/internal/impl/dir_test.go b/internal/impl/dir_test.go index 1a2ef43f495..53ac04593d5 100644 --- a/internal/impl/dir_test.go +++ b/internal/impl/dir_test.go @@ -50,12 +50,12 @@ func TestFindProjectDirFromParentDirSearch(t *testing.T) { root, err := filepath.Abs(t.TempDir()) assert.NoError(err) - err = os.MkdirAll(filepath.Join(root, testCase.allDirs), 0777) + err = os.MkdirAll(filepath.Join(root, testCase.allDirs), 0o777) assert.NoError(err) absProjectPath, err := filepath.Abs(filepath.Join(root, testCase.projectDir, devconfig.DefaultName)) assert.NoError(err) - err = os.WriteFile(absProjectPath, []byte("{}"), 0666) + err = os.WriteFile(absProjectPath, []byte("{}"), 0o666) assert.NoError(err) absSearchPath := filepath.Join(root, testCase.searchPath) @@ -116,14 +116,14 @@ func TestFindParentDirAtPath(t *testing.T) { root, err := filepath.Abs(t.TempDir()) assert.NoError(err) - err = os.MkdirAll(filepath.Join(root, testCase.allDirs), 0777) + err = os.MkdirAll(filepath.Join(root, testCase.allDirs), 0o777) assert.NoError(err) var absProjectPath string if testCase.projectDir != "" { absProjectPath, err = filepath.Abs(filepath.Join(root, testCase.projectDir, devconfig.DefaultName)) assert.NoError(err) - err = os.WriteFile(absProjectPath, []byte("{}"), 0666) + err = os.WriteFile(absProjectPath, []byte("{}"), 0o666) assert.NoError(err) } diff --git a/internal/impl/generate/devcontainer_util.go b/internal/impl/generate/devcontainer_util.go index 7748b9b30ba..23afb3b2006 100644 --- a/internal/impl/generate/devcontainer_util.go +++ b/internal/impl/generate/devcontainer_util.go @@ -171,12 +171,10 @@ func (g *Options) getDevcontainerContent() *devcontainerObject { "python.defaultInterpreterPath": "/code/.devbox/nix/profile/default/bin/python3", } // add python extension if a python3 package is installed - devcontainerContent.Customizations.Vscode.Extensions = - append(devcontainerContent.Customizations.Vscode.Extensions, "ms-python.python") + devcontainerContent.Customizations.Vscode.Extensions = append(devcontainerContent.Customizations.Vscode.Extensions, "ms-python.python") } if strings.Contains(pkg, "go_1_") || pkg == "go" { - devcontainerContent.Customizations.Vscode.Extensions = - append(devcontainerContent.Customizations.Vscode.Extensions, "golang.go") + devcontainerContent.Customizations.Vscode.Extensions = append(devcontainerContent.Customizations.Vscode.Extensions, "golang.go") } // TODO: add support for other common languages } diff --git a/internal/impl/global.go b/internal/impl/global.go index ea73cb976e8..2fd5ca462a9 100644 --- a/internal/impl/global.go +++ b/internal/impl/global.go @@ -18,7 +18,7 @@ const currentGlobalProfile = "default" func GlobalDataPath() (string, error) { path := xdg.DataSubpath(filepath.Join("devbox/global", currentGlobalProfile)) - if err := os.MkdirAll(path, 0755); err != nil { + if err := os.MkdirAll(path, 0o755); err != nil { return "", errors.WithStack(err) } diff --git a/internal/impl/packages.go b/internal/impl/packages.go index d606102c63a..8025c0c0554 100644 --- a/internal/impl/packages.go +++ b/internal/impl/packages.go @@ -11,6 +11,7 @@ import ( "os/exec" "path/filepath" "runtime/trace" + "slices" "strings" "github.com/pkg/errors" @@ -18,7 +19,6 @@ import ( "go.jetpack.io/devbox/internal/devpkg" "go.jetpack.io/devbox/internal/nix/nixprofile" "go.jetpack.io/devbox/internal/shellgen" - "golang.org/x/exp/slices" "go.jetpack.io/devbox/internal/boxcli/usererr" "go.jetpack.io/devbox/internal/debug" @@ -262,7 +262,7 @@ func (d *Devbox) profilePath() (string, error) { debug.Log("ERROR: resetProfileDirForFlakes error: %v\n", err) } - return absPath, errors.WithStack(os.MkdirAll(filepath.Dir(absPath), 0755)) + return absPath, errors.WithStack(os.MkdirAll(filepath.Dir(absPath), 0o755)) } // syncPackagesToProfile ensures that all packages in devbox.json exist in the nix profile, diff --git a/internal/impl/pure_shell.go b/internal/impl/pure_shell.go index 5d43d14071c..67e96b81be4 100644 --- a/internal/impl/pure_shell.go +++ b/internal/impl/pure_shell.go @@ -45,7 +45,6 @@ func findNixInPATH(env map[string]string) ([]string, error) { // Creates a symlink for devbox in .devbox/virtenv/.wrappers/bin // so that devbox can be available inside a pure shell func createDevboxSymlink(d *Devbox) error { - // Get absolute path for where devbox is called devboxPath, err := filepath.Abs(os.Args[0]) if err != nil { @@ -53,7 +52,7 @@ func createDevboxSymlink(d *Devbox) error { } // ensure .devbox/bin directory exists binPath := dotdevboxBinPath(d) - if err := os.MkdirAll(binPath, 0755); err != nil { + if err := os.MkdirAll(binPath, 0o755); err != nil { return errors.WithStack(err) } // Create a symlink between devbox and .devbox/bin diff --git a/internal/impl/util.go b/internal/impl/util.go index 137f81da9a3..bcb01812337 100644 --- a/internal/impl/util.go +++ b/internal/impl/util.go @@ -64,7 +64,7 @@ func utilityLookPath(binName string) (string, error) { func utilityDataPath() (string, error) { path := xdg.DataSubpath("devbox/util") - return path, errors.WithStack(os.MkdirAll(path, 0755)) + return path, errors.WithStack(os.MkdirAll(path, 0o755)) } func utilityNixProfilePath() (string, error) { diff --git a/internal/initrec/recommenders/dotnet/dotnet.go b/internal/initrec/recommenders/dotnet/dotnet.go index 4c67db1cae3..3e6b7939175 100644 --- a/internal/initrec/recommenders/dotnet/dotnet.go +++ b/internal/initrec/recommenders/dotnet/dotnet.go @@ -20,8 +20,10 @@ type Project struct { } `xml:"PropertyGroup,omitempty"` } -const CSharpExtension = "csproj" -const FSharpExtension = "fsproj" +const ( + CSharpExtension = "csproj" + FSharpExtension = "fsproj" +) type Recommender struct { SrcDir string diff --git a/internal/initrec/recommenders/java/java.go b/internal/initrec/recommenders/java/java.go index b7031df7a49..f57e47a3b0e 100644 --- a/internal/initrec/recommenders/java/java.go +++ b/internal/initrec/recommenders/java/java.go @@ -101,7 +101,7 @@ func (r *Recommender) devPackages(builderTool string) ([]string, error) { return devPackagesMap[builderTool], nil } -func getJavaPackage(srcDir string, builderTool string) (string, error) { +func getJavaPackage(srcDir, builderTool string) (string, error) { javaVersion, err := parseJavaVersion(srcDir, builderTool) if err != nil { return "", errors.WithStack(err) @@ -113,7 +113,7 @@ func getJavaPackage(srcDir string, builderTool string) (string, error) { return defaultJava, nil } -func parseJavaVersion(srcDir string, builderTool string) (*analyzer.Version, error) { +func parseJavaVersion(srcDir, builderTool string) (*analyzer.Version, error) { sourceVersion, _ := analyzer.NewVersion("0") if builderTool == MavenType { diff --git a/internal/initrec/recommenders/python/python_pip.go b/internal/initrec/recommenders/python/python_pip.go index 1a13b318dca..f5b5d86f527 100644 --- a/internal/initrec/recommenders/python/python_pip.go +++ b/internal/initrec/recommenders/python/python_pip.go @@ -20,6 +20,7 @@ var _ recommenders.Recommender = (*RecommenderPip)(nil) func (r *RecommenderPip) IsRelevant() bool { return fileutil.Exists(filepath.Join(r.SrcDir, "requirements.txt")) } + func (r *RecommenderPip) Packages() []string { return []string{ "python3", diff --git a/internal/initrec/recommenders/python/python_poetry.go b/internal/initrec/recommenders/python/python_poetry.go index 2fdc5106e80..a9c5b821e81 100644 --- a/internal/initrec/recommenders/python/python_poetry.go +++ b/internal/initrec/recommenders/python/python_poetry.go @@ -26,6 +26,7 @@ func (r *RecommenderPoetry) IsRelevant() bool { return fileutil.Exists(filepath.Join(r.SrcDir, "poetry.lock")) || fileutil.Exists(filepath.Join(r.SrcDir, "pyproject.toml")) } + func (r *RecommenderPoetry) Packages() []string { version := r.PythonVersion() pythonPkg := fmt.Sprintf("python%s", version.MajorMinorConcatenated()) diff --git a/internal/integrations/envsec/envsec.go b/internal/integrations/envsec/envsec.go index 426498430eb..5adf817f075 100644 --- a/internal/integrations/envsec/envsec.go +++ b/internal/integrations/envsec/envsec.go @@ -12,11 +12,12 @@ import ( "go.jetpack.io/pkg/sandbox/runx" ) -var envCache map[string]string -var binPathCache string +var ( + envCache map[string]string + binPathCache string +) func Env(projectDir string) (map[string]string, error) { - defer debug.FunctionTimer().End() if envCache != nil { diff --git a/internal/lock/resolve.go b/internal/lock/resolve.go index fcf242978e3..a005f472999 100644 --- a/internal/lock/resolve.go +++ b/internal/lock/resolve.go @@ -16,7 +16,6 @@ import ( "go.jetpack.io/devbox/internal/debug" "go.jetpack.io/devbox/internal/nix" "go.jetpack.io/devbox/internal/searcher" - "golang.org/x/exp/maps" "golang.org/x/sync/errgroup" ) @@ -74,11 +73,10 @@ func selectForSystem(pkg *searcher.PackageVersion) (searcher.PackageInfo, error) if pi, ok := pkg.Systems["x86_64-linux"]; ok { return pi, nil } - if len(pkg.Systems) == 0 { - return searcher.PackageInfo{}, - fmt.Errorf("no systems found for package %q", pkg.Name) + for _, v := range pkg.Systems { + return v, nil } - return maps.Values(pkg.Systems)[0], nil + return searcher.PackageInfo{}, fmt.Errorf("no systems found for package %q", pkg.Name) } func buildLockSystemInfos(pkg *searcher.PackageVersion) (map[string]*SystemInfo, error) { diff --git a/internal/nix/nix.go b/internal/nix/nix.go index edf128525ba..84b69a63ad4 100644 --- a/internal/nix/nix.go +++ b/internal/nix/nix.go @@ -95,7 +95,7 @@ func savePrintDevEnvCache(path string, out PrintDevEnvOut) error { return errors.WithStack(err) } - _ = os.WriteFile(path, data, 0644) + _ = os.WriteFile(path, data, 0o644) return nil } @@ -162,7 +162,6 @@ var version = "" // Version returns the version of nix from `nix --version`. Usually in a semver // like format, but not strictly. func Version() (string, error) { - if version != "" { return version, nil } diff --git a/internal/nix/nixpkgs.go b/internal/nix/nixpkgs.go index ddca95e58a7..59f2e747fbb 100644 --- a/internal/nix/nixpkgs.go +++ b/internal/nix/nixpkgs.go @@ -92,7 +92,7 @@ func saveToNixpkgsCommitFile(commit string, commitToLocation map[string]string) // Ensure the nixpkgs commit file path exists so we can write an update to it path := nixpkgsCommitFilePath() - err = os.MkdirAll(filepath.Dir(path), 0755) + err = os.MkdirAll(filepath.Dir(path), 0o755) if err != nil && !errors.Is(err, fs.ErrExist) { return errors.WithStack(err) } @@ -104,7 +104,7 @@ func saveToNixpkgsCommitFile(commit string, commitToLocation map[string]string) return errors.WithStack(err) } - return errors.WithStack(os.WriteFile(path, serialized, 0644)) + return errors.WithStack(os.WriteFile(path, serialized, 0o644)) } func nixpkgsCommitFilePath() string { diff --git a/internal/nix/nixprofile/profile.go b/internal/nix/nixprofile/profile.go index c4532bdcf84..f9ed1dd88cb 100644 --- a/internal/nix/nixprofile/profile.go +++ b/internal/nix/nixprofile/profile.go @@ -27,7 +27,6 @@ func ProfileListItems( writer io.Writer, profileDir string, ) ([]*NixProfileListItem, error) { - output, err := nix.ProfileList(writer, profileDir, true /*useJSON*/) if err != nil { // fallback to legacy profile list diff --git a/internal/nix/profiles.go b/internal/nix/profiles.go index 1c97c66f3cf..e01516cc1c6 100644 --- a/internal/nix/profiles.go +++ b/internal/nix/profiles.go @@ -29,8 +29,7 @@ func ProfileList(writer io.Writer, profilePath string, useJSON bool) (string, er return string(out), nil } -func ProfileInstall(writer io.Writer, profilePath string, installable string) error { - +func ProfileInstall(writer io.Writer, profilePath, installable string) error { if !IsInsecureAllowed() && PackageIsInsecure(installable) { knownVulnerabilities := PackageKnownVulnerabilities(installable) errString := fmt.Sprintf("Package %s is insecure. \n\n", installable) @@ -65,7 +64,6 @@ func ProfileInstall(writer io.Writer, profilePath string, installable string) er } func ProfileRemove(profilePath string, indexes []string) error { - cmd := command( append([]string{ "profile", "remove", diff --git a/internal/nix/run.go b/internal/nix/run.go index eea8259c448..81028081799 100644 --- a/internal/nix/run.go +++ b/internal/nix/run.go @@ -14,7 +14,7 @@ import ( "go.jetpack.io/devbox/internal/debug" ) -func RunScript(projectDir string, cmdWithArgs string, env map[string]string) error { +func RunScript(projectDir, cmdWithArgs string, env map[string]string) error { if cmdWithArgs == "" { return errors.New("attempted to run an empty command or script") } diff --git a/internal/nix/search.go b/internal/nix/search.go index 3e1f8b7946e..617740b7793 100644 --- a/internal/nix/search.go +++ b/internal/nix/search.go @@ -11,8 +11,10 @@ import ( "go.jetpack.io/devbox/internal/debug" ) -var ErrPackageNotFound = errors.New("package not found") -var ErrPackageNotInstalled = errors.New("package not installed") +var ( + ErrPackageNotFound = errors.New("package not found") + ErrPackageNotInstalled = errors.New("package not installed") +) type Info struct { // attribute key is different in flakes vs legacy so we should only use it @@ -44,7 +46,6 @@ func parseSearchResults(data []byte) map[string]*Info { PName: result["pname"].(string), Version: result["version"].(string), } - } return infos } @@ -76,7 +77,7 @@ func PkgExistsForAnySystem(pkg string) bool { return false } -func searchSystem(url string, system string) (map[string]*Info, error) { +func searchSystem(url, system string) (map[string]*Info, error) { // Eventually we may pass a writer here, but for now it is safe to use stderr writer := os.Stderr // Search will download nixpkgs if it's not already downloaded. Adding this diff --git a/internal/nix/upgrade.go b/internal/nix/upgrade.go index a0ec627d654..699aac5e182 100644 --- a/internal/nix/upgrade.go +++ b/internal/nix/upgrade.go @@ -35,7 +35,6 @@ func FlakeUpdate(ProfileDir string) error { if err != nil { return redact.Errorf( "error running \"nix flake update\": %s: %w", out, err) - } return nil } diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index 096fed4b201..9552bdebfd8 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -165,15 +165,15 @@ func (m *Manager) createFile( }); err != nil { return errors.WithStack(err) } - var fileMode fs.FileMode = 0644 + var fileMode fs.FileMode = 0o644 if strings.Contains(filePath, "bin/") { - fileMode = 0755 + fileMode = 0o755 } if err := os.WriteFile(filePath, buf.Bytes(), fileMode); err != nil { return errors.WithStack(err) } - if fileMode == 0755 { + if fileMode == 0o755 { if err := createSymlink(m.ProjectDir(), filePath); err != nil { return err } @@ -244,7 +244,7 @@ func createDir(path string) error { if path == "" { return nil } - return errors.WithStack(os.MkdirAll(path, 0755)) + return errors.WithStack(os.MkdirAll(path, 0o755)) } func createSymlink(root, filePath string) error { @@ -252,7 +252,7 @@ func createSymlink(root, filePath string) error { newname := filepath.Join(root, VirtenvBinPath, name) // Create bin path just in case it doesn't exist - if err := os.MkdirAll(filepath.Join(root, VirtenvBinPath), 0755); err != nil { + if err := os.MkdirAll(filepath.Join(root, VirtenvBinPath), 0o755); err != nil { return errors.WithStack(err) } diff --git a/internal/pullbox/s3/pull.go b/internal/pullbox/s3/pull.go index 13c3d58faf7..06c5a2c5b8b 100644 --- a/internal/pullbox/s3/pull.go +++ b/internal/pullbox/s3/pull.go @@ -26,7 +26,6 @@ func PullToTmp( profile string, ) (string, error) { config, err := assumeRole(ctx, creds) - if err != nil { return "", err } diff --git a/internal/searcher/parse.go b/internal/searcher/parse.go index ef4f34d5c80..9206c83dc89 100644 --- a/internal/searcher/parse.go +++ b/internal/searcher/parse.go @@ -9,7 +9,7 @@ import ( // ParseVersionedPackage checks if the given package is a versioned package // (`python@3.10`) and returns its name and version -func ParseVersionedPackage(versionedName string) (name string, version string, found bool) { +func ParseVersionedPackage(versionedName string) (name, version string, found bool) { // use the last @ symbol as the version delimiter, some packages have @ in the name atSymbolIndex := strings.LastIndex(versionedName, "@") if atSymbolIndex == -1 { diff --git a/internal/services/client.go b/internal/services/client.go index 8712d5554d2..3aceab6dee3 100644 --- a/internal/services/client.go +++ b/internal/services/client.go @@ -22,7 +22,7 @@ type Process struct { ExitCode int } -func StartServices(ctx context.Context, w io.Writer, serviceName string, projectDir string) error { +func StartServices(ctx context.Context, w io.Writer, serviceName, projectDir string) error { path := fmt.Sprintf("/process/start/%s", serviceName) body, status, err := clientRequest(path, http.MethodPost, projectDir) @@ -37,10 +37,9 @@ func StartServices(ctx context.Context, w io.Writer, serviceName string, project default: return fmt.Errorf("error starting service %s: %s", serviceName, body) } - } -func StopServices(ctx context.Context, serviceName string, projectDir string, w io.Writer) error { +func StopServices(ctx context.Context, serviceName, projectDir string, w io.Writer) error { path := fmt.Sprintf("/process/stop/%s", serviceName) body, status, err := clientRequest(path, http.MethodPatch, projectDir) @@ -57,7 +56,7 @@ func StopServices(ctx context.Context, serviceName string, projectDir string, w } } -func RestartServices(ctx context.Context, serviceName string, projectDir string, w io.Writer) error { +func RestartServices(ctx context.Context, serviceName, projectDir string, w io.Writer) error { path := fmt.Sprintf("/process/restart/%s", serviceName) body, status, err := clientRequest(path, http.MethodPost, projectDir) @@ -103,7 +102,7 @@ func ListServices(ctx context.Context, projectDir string, w io.Writer) ([]Proces } } -func clientRequest(path string, method string, projectDir string) (string, int, error) { +func clientRequest(path, method, projectDir string) (string, int, error) { port, err := GetProcessManagerPort(projectDir) if err != nil { err := fmt.Errorf("unable to connect to process-compose server: %s", err.Error()) diff --git a/internal/services/config.go b/internal/services/config.go index 5ef9257b99f..b35bc702701 100644 --- a/internal/services/config.go +++ b/internal/services/config.go @@ -14,7 +14,7 @@ import ( "go.jetpack.io/devbox/internal/cuecfg" ) -func FromUserProcessCompose(projectDir string, userProcessCompose string) Services { +func FromUserProcessCompose(projectDir, userProcessCompose string) Services { processComposeYaml := lookupProcessCompose(projectDir, userProcessCompose) if processComposeYaml == "" { return nil diff --git a/internal/services/manager.go b/internal/services/manager.go index d7e090acc12..12070e02377 100644 --- a/internal/services/manager.go +++ b/internal/services/manager.go @@ -64,7 +64,7 @@ func newGlobalProcessComposeConfig() *globalProcessComposeConfig { func globalProcessComposeJSONPath() (string, error) { path := xdg.DataSubpath(filepath.Join("devbox", "global")) - return filepath.Join(path, "process-compose.json"), errors.WithStack(os.MkdirAll(path, 0755)) + return filepath.Join(path, "process-compose.json"), errors.WithStack(os.MkdirAll(path, 0o755)) } func readGlobalProcessComposeJSON(file *os.File) *globalProcessComposeConfig { @@ -102,7 +102,7 @@ func openGlobalConfigFile() (*os.File, error) { return nil, fmt.Errorf("failed to get config path: %w", err) } - globalConfigFile, err := os.OpenFile(configPath, os.O_WRONLY|os.O_CREATE, 0664) + globalConfigFile, err := os.OpenFile(configPath, os.O_WRONLY|os.O_CREATE, 0o664) if err != nil { return nil, fmt.Errorf("failed to open config file: %w", err) } @@ -179,7 +179,6 @@ func StartProcessManager( } func runProcessManagerInForeground(cmd *exec.Cmd, config *globalProcessComposeConfig, port int, projectDir string, w io.Writer) error { - if err := cmd.Start(); err != nil { return fmt.Errorf("failed to start process-compose: %w", err) } @@ -220,8 +219,7 @@ func runProcessManagerInForeground(cmd *exec.Cmd, config *globalProcessComposeCo } func runProcessManagerInBackground(cmd *exec.Cmd, config *globalProcessComposeConfig, port int, projectDir string) error { - - logfile, err := os.OpenFile(processComposeLogfile, os.O_CREATE|os.O_WRONLY|os.O_APPEND|os.O_TRUNC, 0664) + logfile, err := os.OpenFile(processComposeLogfile, os.O_CREATE|os.O_WRONLY|os.O_APPEND|os.O_TRUNC, 0o664) if err != nil { return fmt.Errorf("failed to open process-compose log file: %w", err) } @@ -307,7 +305,6 @@ func StopAllProcessManagers(ctx context.Context, w io.Writer) error { } func ProcessManagerIsRunning(projectDir string) bool { - configFile, err := openGlobalConfigFile() if err != nil { return false diff --git a/internal/services/status.go b/internal/services/status.go index 548a712dcbb..317ba1a96c0 100644 --- a/internal/services/status.go +++ b/internal/services/status.go @@ -94,13 +94,13 @@ func cloudFilePath(projectDir string) string { // initCloudDir creates the service status directory and a .gitignore file func initCloudDir(projectDir, hostID string) error { cloudDirPath := cloudFilePath(projectDir) - _ = os.MkdirAll(filepath.Join(cloudDirPath, hostID), 0755) + _ = os.MkdirAll(filepath.Join(cloudDirPath, hostID), 0o755) gitignorePath := filepath.Join(cloudDirPath, ".gitignore") _, err := os.Stat(gitignorePath) if !errors.Is(err, fs.ErrNotExist) { return nil } - return errors.WithStack(os.WriteFile(gitignorePath, []byte("*"), 0644)) + return errors.WithStack(os.WriteFile(gitignorePath, []byte("*"), 0o644)) } type ServiceStatus struct { @@ -115,8 +115,8 @@ func writeServiceStatusFile(path string, status *ServiceStatus) error { if err != nil { return errors.WithStack(err) } - _ = os.MkdirAll(filepath.Dir(path), 0755) // create path, ignore error - return errors.WithStack(os.WriteFile(path, content, 0644)) + _ = os.MkdirAll(filepath.Dir(path), 0o755) // create path, ignore error + return errors.WithStack(os.WriteFile(path, content, 0o644)) } //lint:ignore U1000 Ignore unused function temporarily for debugging diff --git a/internal/shellgen/generate.go b/internal/shellgen/generate.go index 4c90a22ab3e..0e3fae29471 100644 --- a/internal/shellgen/generate.go +++ b/internal/shellgen/generate.go @@ -67,7 +67,7 @@ var ( tmplOldBuf = bytes.NewBuffer(make([]byte, 0, 4096)) ) -func writeFromTemplate(path string, plan any, tmplName string, generatedName string) error { +func writeFromTemplate(path string, plan any, tmplName, generatedName string) error { tmplKey := tmplName + ".tmpl" tmpl := tmplCache[tmplKey] if tmpl == nil { @@ -93,11 +93,11 @@ func writeFromTemplate(path string, plan any, tmplName string, generatedName str var ( outPath = filepath.Join(path, generatedName) flag = os.O_RDWR | os.O_CREATE - perm = fs.FileMode(0644) + perm = fs.FileMode(0o644) ) outFile, err := os.OpenFile(outPath, flag, perm) if errors.Is(err, fs.ErrNotExist) { - if err := os.MkdirAll(path, 0755); err != nil { + if err := os.MkdirAll(path, 0o755); err != nil { return errors.WithStack(err) } outFile, err = os.OpenFile(outPath, flag, perm) diff --git a/internal/shellgen/generate_test.go b/internal/shellgen/generate_test.go index c6a9c4fe056..86929d0562a 100644 --- a/internal/shellgen/generate_test.go +++ b/internal/shellgen/generate_test.go @@ -49,7 +49,6 @@ func TestWriteFromTemplate(t *testing.T) { } cmpGoldenFile(t, outPath, "testdata/flake-empty.nix.golden") }) - } func cmpGoldenFile(t *testing.T, gotPath, wantGoldenPath string) { @@ -58,7 +57,7 @@ func cmpGoldenFile(t *testing.T, gotPath, wantGoldenPath string) { t.Fatal("got error reading generated file:", err) } if *update { - err = os.WriteFile(wantGoldenPath, got, 0666) + err = os.WriteFile(wantGoldenPath, got, 0o666) if err != nil { t.Error("got error updating golden file:", err) } @@ -81,49 +80,51 @@ If the new file is correct, you can update the golden file with: } } -var locker = &lockmock{} -var testFlakeTmplPlan = &struct { - NixpkgsInfo struct { - URL string - } - FlakeInputs []flakeInput -}{ - NixpkgsInfo: struct { - URL string +var ( + locker = &lockmock{} + testFlakeTmplPlan = &struct { + NixpkgsInfo struct { + URL string + } + FlakeInputs []flakeInput }{ - URL: "https://github.com/nixos/nixpkgs/archive/b9c00c1d41ccd6385da243415299b39aa73357be.tar.gz", - }, - FlakeInputs: []flakeInput{ - { - Name: "nixpkgs", - URL: "github:NixOS/nixpkgs/b9c00c1d41ccd6385da243415299b39aa73357be", - Packages: []*devpkg.Package{ - devpkg.PackageFromString("php@latest", locker), - devpkg.PackageFromString("php81Packages.composer@latest", locker), - devpkg.PackageFromString("php81Extensions.blackfire@latest", locker), - devpkg.PackageFromString("flyctl@latest", locker), - devpkg.PackageFromString("postgresql@latest", locker), - devpkg.PackageFromString("tree@latest", locker), - devpkg.PackageFromString("git@latest", locker), - devpkg.PackageFromString("zsh@latest", locker), - devpkg.PackageFromString("openssh@latest", locker), - devpkg.PackageFromString("vim@latest", locker), - devpkg.PackageFromString("sqlite@latest", locker), - devpkg.PackageFromString("jq@latest", locker), - devpkg.PackageFromString("delve@latest", locker), - devpkg.PackageFromString("ripgrep@latest", locker), - devpkg.PackageFromString("shellcheck@latest", locker), - devpkg.PackageFromString("terraform@latest", locker), - devpkg.PackageFromString("xz@latest", locker), - devpkg.PackageFromString("zstd@latest", locker), - devpkg.PackageFromString("gnupg@latest", locker), - devpkg.PackageFromString("go_1_20@latest", locker), - devpkg.PackageFromString("python3@latest", locker), - devpkg.PackageFromString("graphviz@latest", locker), + NixpkgsInfo: struct { + URL string + }{ + URL: "https://github.com/nixos/nixpkgs/archive/b9c00c1d41ccd6385da243415299b39aa73357be.tar.gz", + }, + FlakeInputs: []flakeInput{ + { + Name: "nixpkgs", + URL: "github:NixOS/nixpkgs/b9c00c1d41ccd6385da243415299b39aa73357be", + Packages: []*devpkg.Package{ + devpkg.PackageFromString("php@latest", locker), + devpkg.PackageFromString("php81Packages.composer@latest", locker), + devpkg.PackageFromString("php81Extensions.blackfire@latest", locker), + devpkg.PackageFromString("flyctl@latest", locker), + devpkg.PackageFromString("postgresql@latest", locker), + devpkg.PackageFromString("tree@latest", locker), + devpkg.PackageFromString("git@latest", locker), + devpkg.PackageFromString("zsh@latest", locker), + devpkg.PackageFromString("openssh@latest", locker), + devpkg.PackageFromString("vim@latest", locker), + devpkg.PackageFromString("sqlite@latest", locker), + devpkg.PackageFromString("jq@latest", locker), + devpkg.PackageFromString("delve@latest", locker), + devpkg.PackageFromString("ripgrep@latest", locker), + devpkg.PackageFromString("shellcheck@latest", locker), + devpkg.PackageFromString("terraform@latest", locker), + devpkg.PackageFromString("xz@latest", locker), + devpkg.PackageFromString("zstd@latest", locker), + devpkg.PackageFromString("gnupg@latest", locker), + devpkg.PackageFromString("go_1_20@latest", locker), + devpkg.PackageFromString("python3@latest", locker), + devpkg.PackageFromString("graphviz@latest", locker), + }, }, }, - }, -} + } +) type lockmock struct{} diff --git a/internal/shellgen/scripts.go b/internal/shellgen/scripts.go index 77bf44c07d9..b92bc58ee7b 100644 --- a/internal/shellgen/scripts.go +++ b/internal/shellgen/scripts.go @@ -33,7 +33,7 @@ type devboxer interface { // Scripts (and hooks) are persisted so that we can easily call them from devbox run (inside or outside shell). func WriteScriptsToFiles(devbox devboxer) error { defer debug.FunctionTimer().End() - err := os.MkdirAll(filepath.Join(devbox.ProjectDir(), scriptsDir), 0755) // Ensure directory exists. + err := os.MkdirAll(filepath.Join(devbox.ProjectDir(), scriptsDir), 0o755) // Ensure directory exists. if err != nil { return errors.WithStack(err) } @@ -95,7 +95,7 @@ func writeHookFile(devbox devboxer, body string) (err error) { return errors.WithStack(err) } -func WriteScriptFile(devbox devboxer, name string, body string) (err error) { +func WriteScriptFile(devbox devboxer, name, body string) (err error) { script, err := createScriptFile(devbox, name) if err != nil { return errors.WithStack(err) @@ -124,7 +124,7 @@ func createScriptFile(devbox devboxer, name string) (script *os.File, err error) } }() - err = script.Chmod(0755) + err = script.Chmod(0o755) if err != nil { return nil, errors.WithStack(err) } diff --git a/internal/telemetry/sentry.go b/internal/telemetry/sentry.go index d3808878ee3..258fec0f544 100644 --- a/internal/telemetry/sentry.go +++ b/internal/telemetry/sentry.go @@ -167,7 +167,7 @@ func exportedErrType(err error) string { // splitPkgFunc splits a fully-qualified function or method name into its // package path and base name components. -func splitPkgFunc(name string) (pkgPath string, funcName string) { +func splitPkgFunc(name string) (pkgPath, funcName string) { // Using the following fully-qualified function name as an example: // go.jetpack.io/devbox/internal/impl.(*Devbox).RunScript diff --git a/internal/templates/template.go b/internal/templates/template.go index 4842be88af6..9bee6828a7c 100644 --- a/internal/templates/template.go +++ b/internal/templates/template.go @@ -10,16 +10,16 @@ import ( "os" "os/exec" "path/filepath" + "slices" "strings" "github.com/pkg/errors" "github.com/samber/lo" - "golang.org/x/exp/slices" "go.jetpack.io/devbox/internal/boxcli/usererr" ) -func InitFromName(w io.Writer, template string, target string) error { +func InitFromName(w io.Writer, template, target string) error { templatePath, ok := templates[template] if !ok { return usererr.New("unknown template name or format %q", template) @@ -27,7 +27,7 @@ func InitFromName(w io.Writer, template string, target string) error { return InitFromRepo(w, "https://github.com/jetpack-io/devbox", templatePath, target) } -func InitFromRepo(w io.Writer, repo string, subdir string, target string) error { +func InitFromRepo(w io.Writer, repo, subdir, target string) error { if err := createDirAndEnsureEmpty(target); err != nil { return err } @@ -74,7 +74,7 @@ func List(w io.Writer, showAll bool) { func createDirAndEnsureEmpty(dir string) error { entries, err := os.ReadDir(dir) if errors.Is(err, os.ErrNotExist) { - if err = os.MkdirAll(dir, 0755); err != nil { + if err = os.MkdirAll(dir, 0o755); err != nil { return errors.WithStack(err) } } else if err != nil { diff --git a/internal/vercheck/vercheck.go b/internal/vercheck/vercheck.go index 9f2feb0f26f..aeb498a29a2 100644 --- a/internal/vercheck/vercheck.go +++ b/internal/vercheck/vercheck.go @@ -172,7 +172,6 @@ type updatedVersions struct { // version is available. It parses the output to get the new launcher and // devbox versions. func triggerUpdate(stdErr io.Writer) (*updatedVersions, error) { - exePath := os.Getenv(envir.LauncherPath) if exePath == "" { ux.Fwarning(stdErr, "expected LAUNCHER_PATH to be set. Defaulting to \"devbox\".") diff --git a/internal/vercheck/vercheck_test.go b/internal/vercheck/vercheck_test.go index b7f7a518815..cc9894898ce 100644 --- a/internal/vercheck/vercheck_test.go +++ b/internal/vercheck/vercheck_test.go @@ -13,7 +13,6 @@ import ( ) func TestCheckVersion(t *testing.T) { - isDevBuild = false t.Run("skip_if_devbox_cloud", func(t *testing.T) { @@ -110,7 +109,6 @@ func TestCheckVersion(t *testing.T) { for _, cmdPath := range commandSkipList { cmdPathUnderscored := strings.ReplaceAll(cmdPath, " ", "_") t.Run("skip_if_cmd_path_is_"+cmdPathUnderscored, func(t *testing.T) { - // set older launcher version t.Setenv(envir.LauncherVersion, "v0.1.0") @@ -122,5 +120,4 @@ func TestCheckVersion(t *testing.T) { }) } }) - } diff --git a/internal/wrapnix/wrapper.go b/internal/wrapnix/wrapper.go index d60f90710a7..cc6bd019d6e 100644 --- a/internal/wrapnix/wrapper.go +++ b/internal/wrapnix/wrapper.go @@ -49,7 +49,7 @@ func CreateWrappers(ctx context.Context, devbox devboxer) error { // Recreate the bin wrapper directory destPath := filepath.Join(wrapperBinPath(devbox)) - _ = os.MkdirAll(destPath, 0755) + _ = os.MkdirAll(destPath, 0o755) bashPath := cmdutil.GetPathOrDefault("bash", "/bin/bash") @@ -95,7 +95,7 @@ func CreateWrappers(ctx context.Context, devbox devboxer) error { // symlink is updated when devbox is updated. func CreateDevboxSymlinkIfPossible() error { // Get the symlink path; create the symlink directory if it doesn't exist. - if err := fileutil.EnsureDirExists(devboxSymlinkDir, 0755, false /*chmod*/); err != nil { + if err := fileutil.EnsureDirExists(devboxSymlinkDir, 0o755, false /*chmod*/); err != nil { return err } currentDevboxSymlinkPath := filepath.Join(devboxSymlinkDir, "devbox") @@ -148,7 +148,7 @@ func createWrapper(args *createWrapperArgs) error { return errors.WithStack(err) } - return errors.WithStack(os.WriteFile(args.destPath, buf.Bytes(), 0755)) + return errors.WithStack(os.WriteFile(args.destPath, buf.Bytes(), 0o755)) } // createSymlinksForSupportDirs creates symlinks for the support dirs diff --git a/internal/xdg/xdg.go b/internal/xdg/xdg.go index 54a822af1d0..467f439d331 100644 --- a/internal/xdg/xdg.go +++ b/internal/xdg/xdg.go @@ -31,7 +31,7 @@ func configDir() string { return resolveDir(envir.XDGConfigHome, ".config") } func cacheDir() string { return resolveDir(envir.XDGCacheHome, ".cache") } func stateDir() string { return resolveDir(envir.XDGStateHome, ".local/state") } -func resolveDir(envvar string, defaultPath string) string { +func resolveDir(envvar, defaultPath string) string { dir := os.Getenv(envvar) if dir != "" { return dir diff --git a/plugins/builtins.go b/plugins/builtins.go index e0411a2c9ff..2084b6f03ac 100644 --- a/plugins/builtins.go +++ b/plugins/builtins.go @@ -22,8 +22,7 @@ func Builtins() ([]fs.DirEntry, error) { }), nil } -type BuiltIn struct { -} +type BuiltIn struct{} var builtInMap = map[*regexp.Regexp]string{ regexp.MustCompile(`^(apache|apacheHttpd)$`): "apacheHttpd", diff --git a/testscripts/testrunner/assert.go b/testscripts/testrunner/assert.go index 3111d1c0875..3e4b3af9928 100644 --- a/testscripts/testrunner/assert.go +++ b/testscripts/testrunner/assert.go @@ -135,7 +135,7 @@ func assertPathOrder(script *testscript.TestScript, neg bool, args []string) { } } -func containsInOrder(subpaths []string, expected []string) bool { +func containsInOrder(subpaths, expected []string) bool { if len(expected) == 0 { return true // no parts passed in, assertion trivially holds. } diff --git a/testscripts/testrunner/examplesrunner.go b/testscripts/testrunner/examplesrunner.go index d6acd8f901d..be6ffcc0c20 100644 --- a/testscripts/testrunner/examplesrunner.go +++ b/testscripts/testrunner/examplesrunner.go @@ -28,7 +28,7 @@ const xdgStateHomeDir = "/tmp/devbox-testscripts" // For each project, runs `devbox run run_test` (if script exists) and asserts it succeeds. func RunDevboxTestscripts(t *testing.T, dir string) { // ensure the state home dir for devbox exists - err := os.MkdirAll(xdgStateHomeDir, 0700) + err := os.MkdirAll(xdgStateHomeDir, 0o700) if err != nil && !errors.Is(err, fs.ErrNotExist) { t.Error(err) } @@ -95,7 +95,6 @@ func runSingleDevboxTestscript(t *testing.T, dir, projectDir string) { // save a reference to the original params.Setup so that we can wrap it below setup := params.Setup params.Setup = func(envs *testscript.Env) error { - // We set a custom XDG_STATE_HOME to an intentionally short path. // Reason: devbox plugins like postgres store unix socket files in their state dir. envs.Setenv(envir.XDGStateHome, xdgStateHomeDir) diff --git a/testscripts/testrunner/setupenv.go b/testscripts/testrunner/setupenv.go index 4ca9768f11f..2a928dd9851 100644 --- a/testscripts/testrunner/setupenv.go +++ b/testscripts/testrunner/setupenv.go @@ -52,7 +52,7 @@ func setupCacheHome(envs *testscript.Env) error { // test set it to a location within the test's working directory: cacheHome := filepath.Join(envs.WorkDir, ".cache") envs.Setenv(envir.XDGCacheHome, cacheHome) - err := os.MkdirAll(cacheHome, 0755) // Ensure dir exists. + err := os.MkdirAll(cacheHome, 0o755) // Ensure dir exists. if err != nil { return err } @@ -62,7 +62,7 @@ func setupCacheHome(envs *testscript.Env) error { // nixpkgs every time. // Here we create a shared location for nix's cache, and symlink from // the test's working directory. - err = os.MkdirAll(xdg.CacheSubpath("devbox-tests/nix"), 0755) // Ensure dir exists. + err = os.MkdirAll(xdg.CacheSubpath("devbox-tests/nix"), 0o755) // Ensure dir exists. if err != nil { return err } diff --git a/testscripts/testrunner/updater/main.go b/testscripts/testrunner/updater/main.go index c838d1aed71..ce7fe2336fa 100644 --- a/testscripts/testrunner/updater/main.go +++ b/testscripts/testrunner/updater/main.go @@ -23,7 +23,6 @@ func main() { // run will loop over all examples that have run_test script // run `devbox update` on each such example func run() error { - devboxRepoDir, err := devboxRepoDir() if err != nil { return errors.WithStack(err)