Skip to content

Commit

Permalink
Merge pull request #194 from rebuy-de/add-staticcheck
Browse files Browse the repository at this point in the history
PF-3455 add staticcheck
  • Loading branch information
svenwltr authored Mar 20, 2024
2 parents d2c725f + 672ffb3 commit b05ceae
Show file tree
Hide file tree
Showing 43 changed files with 140 additions and 66 deletions.
2 changes: 1 addition & 1 deletion buildutil
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env sh
set -eu
go mod vendor
test -z "$(go env GOWORK)" && go mod vendor || go work vendor
go generate ./...
exec go run ./cmd/buildutil "$@"
2 changes: 1 addition & 1 deletion cmd/buildutil/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/executil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/executil"
)

type ChainExecutor struct {
Expand Down
16 changes: 12 additions & 4 deletions cmd/buildutil/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"time"

"github.com/pkg/errors"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/sirupsen/logrus"
"golang.org/x/mod/modfile"
"golang.org/x/tools/go/packages"
Expand Down Expand Up @@ -153,6 +153,7 @@ type BuildInfo struct {
Module string
Dir string
Version string
Work string
}

Commit struct {
Expand Down Expand Up @@ -255,6 +256,7 @@ func CollectBuildInformation(ctx context.Context, p BuildParameters) (BuildInfo,
info.Commit.Date = time.Unix(e.OutputInt64("git", "show", "-s", "--format=%ct"), 0).Format(time.RFC3339)
info.Commit.Hash = e.OutputString("git", "rev-parse", "HEAD")
info.Commit.Branch = e.OutputString("git", "rev-parse", "--abbrev-ref", "HEAD")
info.Go.Work = e.OutputString(p.GoCommand, "env", "GOWORK")

info.SDKVersion, err = ParseVersion(e.OutputString(p.GoCommand, "list", "-mod=readonly", "-m", "-f", "{{.Version}}", "github.com/rebuy-de/rebuy-go-sdk/..."))
if err != nil {
Expand Down Expand Up @@ -287,7 +289,9 @@ func CollectBuildInformation(ctx context.Context, p BuildParameters) (BuildInfo,
info.Go.Name = nameMatch[1]
}

cmdutil.Must(e.Err())
if e.Err() != nil {
return info, e.Err()
}

targetSystems := []SystemInfo{}
for _, target := range p.TargetSystems {
Expand Down Expand Up @@ -322,7 +326,9 @@ func CollectBuildInformation(ctx context.Context, p BuildParameters) (BuildInfo,
pkgs, err := packages.Load(&packages.Config{
Context: ctx,
}, search)
cmdutil.Must(err)
if err != nil {
return info, err
}

for _, pkg := range pkgs {
if pkg.Name != "main" {
Expand Down Expand Up @@ -352,7 +358,9 @@ func CollectBuildInformation(ctx context.Context, p BuildParameters) (BuildInfo,
}

testPackages, err := packages.Load(nil, "./...")
cmdutil.Must(err)
if err != nil {
return info, err
}

info.Test.Packages = []string{}
info.Test.Files = []string{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/buildutil/instrumentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"sync"
"time"

"github.com/rebuy-de/rebuy-go-sdk/v7/cmd/buildutil/internal/typeutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/cmd/buildutil/internal/typeutil"
"github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/buildutil/logutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/tidwall/pretty"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/buildutil/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
)

func main() {
Expand Down
29 changes: 25 additions & 4 deletions cmd/buildutil/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/executil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/executil"
)

func call(ctx context.Context, command string, args ...string) {
Expand Down Expand Up @@ -139,13 +139,18 @@ func (r *Runner) RunClean(ctx context.Context, cmd *cobra.Command, args []string
func (r *Runner) RunVendor(ctx context.Context, cmd *cobra.Command, args []string) {
defer r.Inst.Durations.Steps.Stopwatch("vendor")()

call(ctx, r.Parameters.GoCommand, "mod", "vendor")
if r.Info.Go.Work == "" {
call(ctx, r.Parameters.GoCommand, "mod", "vendor")
} else {
call(ctx, r.Parameters.GoCommand, "work", "vendor")
}
}

func (r *Runner) RunTest(ctx context.Context, cmd *cobra.Command, args []string) {
defer r.Inst.Durations.Steps.Stopwatch("test")()

r.RunTestFormat(ctx, cmd, args)
r.RunTestStaticcheck(ctx, cmd, args)
r.RunTestVet(ctx, cmd, args)
r.RunTestPackages(ctx, cmd, args)
}
Expand All @@ -159,6 +164,22 @@ func (r *Runner) RunTestFormat(ctx context.Context, cmd *cobra.Command, args []s
call(ctx, "gofmt", a...)
}

func (r *Runner) RunTestStaticcheck(ctx context.Context, cmd *cobra.Command, args []string) {
fail := []string{
"all",
"-SA1019", // Using a deprecated function, variable, constant or field
}

logrus.Info("Testing staticcheck")
defer r.Inst.Durations.Testing.Stopwatch("staticcheck")()
call(ctx, r.Parameters.GoCommand,
"run", "honnef.co/go/tools/cmd/staticcheck",
"-f", "stylish",
"-fail", strings.Join(fail, ","),
"./...",
)
}

func (r *Runner) RunTestVet(ctx context.Context, cmd *cobra.Command, args []string) {
a := []string{"vet"}
a = append(a, r.Info.Test.Packages...)
Expand Down Expand Up @@ -201,7 +222,7 @@ func (r *Runner) RunBuild(ctx context.Context, cmd *cobra.Command, args []string
ldFlags := []string{}
for _, entry := range ldData {
ldFlags = append(ldFlags, fmt.Sprintf(
`-X 'github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil.%s=%s'`,
`-X 'github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil.%s=%s'`,
entry.name, entry.value,
))
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/cdnmirror/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/evanw/esbuild/pkg/api"
"github.com/pkg/errors"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/full/buildutil
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -eu
go mod vendor
go generate ./...
exec go run github.com/rebuy-de/rebuy-go-sdk/v7/cmd/buildutil "$@"
exec go run github.com/rebuy-de/rebuy-go-sdk/v8/cmd/buildutil "$@"
4 changes: 2 additions & 2 deletions examples/full/cmd/inst.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net/http"
"strings"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/instutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/logutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/instutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/logutil"
)

// inst.go contains all functions for handling instrumentation (ie metrics and
Expand Down
7 changes: 3 additions & 4 deletions examples/full/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"io/fs"
"os"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/podutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/redisutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/podutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/redisutil"
"github.com/redis/go-redis/v9"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -90,7 +90,6 @@ func (r *DaemonRunner) Run(ctx context.Context) error {
// DevRunner bootstraps the application for local development. It defines the
// related flags and calls the actual server code.
type DevRunner struct {
redisAddress string
}

// Bind implements the cmdutil.Runner interface and defines command line flags.
Expand Down
8 changes: 4 additions & 4 deletions examples/full/cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/pkg/errors"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/logutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/redisutil"
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/webutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/logutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/redisutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/webutil"
"github.com/redis/go-redis/v9"
"golang.org/x/sync/errgroup"
)
Expand Down
9 changes: 6 additions & 3 deletions examples/full/go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
module github.com/rebuy-de/rebuy-go-sdk/v7/examples/full
module github.com/rebuy-de/rebuy-go-sdk/v8/examples/full

go 1.22.0

replace github.com/rebuy-de/rebuy-go-sdk/v7 => ../..
replace github.com/rebuy-de/rebuy-go-sdk/v8 => ../..

require (
github.com/go-chi/chi/v5 v5.0.12
github.com/pkg/errors v0.9.1
github.com/rebuy-de/rebuy-go-sdk/v7 v7.0.0
github.com/rebuy-de/rebuy-go-sdk/v8 v8.0.0
github.com/redis/go-redis/v9 v9.5.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
golang.org/x/sync v0.6.0
honnef.co/go/tools v0.4.7
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/AlekSi/pointer v1.2.0 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
Expand Down Expand Up @@ -96,6 +98,7 @@ require (
gitlab.com/digitalxero/go-conventional-commit v1.0.7 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/oauth2 v0.17.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions examples/full/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w=
github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
Expand Down Expand Up @@ -266,6 +268,8 @@ golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE=
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
Expand Down Expand Up @@ -348,3 +352,5 @@ 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.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
4 changes: 2 additions & 2 deletions examples/full/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/sirupsen/logrus"

"github.com/rebuy-de/rebuy-go-sdk/v7/examples/full/cmd"
"github.com/rebuy-de/rebuy-go-sdk/v8/examples/full/cmd"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion examples/full/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ package main

// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
import (
_ "github.com/rebuy-de/rebuy-go-sdk/v7/cmd/buildutil"
_ "github.com/rebuy-de/rebuy-go-sdk/v8/cmd/buildutil"
_ "honnef.co/go/tools/cmd/staticcheck"
)
2 changes: 1 addition & 1 deletion examples/minimal/buildutil
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -eu
go mod vendor
go generate ./...
exec go run github.com/rebuy-de/rebuy-go-sdk/v7/cmd/buildutil "$@"
exec go run github.com/rebuy-de/rebuy-go-sdk/v8/cmd/buildutil "$@"
2 changes: 1 addition & 1 deletion examples/minimal/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
Expand Down
9 changes: 6 additions & 3 deletions examples/minimal/go.mod
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
module github.com/rebuy-de/rebuy-go-sdk/v7/examples/minimal
module github.com/rebuy-de/rebuy-go-sdk/v8/examples/minimal

go 1.22.0

replace github.com/rebuy-de/rebuy-go-sdk/v7 => ../..
replace github.com/rebuy-de/rebuy-go-sdk/v8 => ../..

require (
github.com/rebuy-de/rebuy-go-sdk/v7 v7.0.0
github.com/rebuy-de/rebuy-go-sdk/v8 v8.0.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
honnef.co/go/tools v0.4.7
)

require (
dario.cat/mergo v1.0.0 // indirect
github.com/AlekSi/pointer v1.2.0 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
Expand Down Expand Up @@ -76,6 +78,7 @@ require (
gitlab.com/digitalxero/go-conventional-commit v1.0.7 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/mod v0.15.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/sys v0.17.0 // indirect
Expand Down
6 changes: 6 additions & 0 deletions examples/minimal/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/AlekSi/pointer v1.2.0 h1:glcy/gc4h8HnG2Z3ZECSzZ1IX1x2JxRVuDzaJwQE0+w=
github.com/AlekSi/pointer v1.2.0/go.mod h1:gZGfd3dpW4vEc/UlyfKKi1roIqcCgwOIvb0tSNSBle0=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
Expand Down Expand Up @@ -211,6 +213,8 @@ golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a h1:Jw5wfR+h9mnIYH+OtGT2im5wV1YGGDora5vTv/aa5bE=
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
Expand Down Expand Up @@ -281,3 +285,5 @@ 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.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
4 changes: 2 additions & 2 deletions examples/minimal/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package main

import (
"github.com/rebuy-de/rebuy-go-sdk/v7/pkg/cmdutil"
"github.com/rebuy-de/rebuy-go-sdk/v8/pkg/cmdutil"
"github.com/sirupsen/logrus"

"github.com/rebuy-de/rebuy-go-sdk/v7/examples/minimal/cmd"
"github.com/rebuy-de/rebuy-go-sdk/v8/examples/minimal/cmd"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion examples/minimal/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ package main

// https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module
import (
_ "github.com/rebuy-de/rebuy-go-sdk/v7/cmd/buildutil"
_ "github.com/rebuy-de/rebuy-go-sdk/v8/cmd/buildutil"
_ "honnef.co/go/tools/cmd/staticcheck"
)
Loading

0 comments on commit b05ceae

Please sign in to comment.