diff --git a/dynamic/main.go b/dynamic/main.go index 2fa6ef543..7a8a9c0ef 100644 --- a/dynamic/main.go +++ b/dynamic/main.go @@ -18,11 +18,12 @@ import ( "context" "encoding/json" "fmt" - "github.com/pkg/errors" - "github.com/spf13/afero" "os" "os/exec" + "github.com/pkg/errors" + "github.com/spf13/afero" + "github.com/blang/semver" "github.com/opentofu/opentofu/shim/run" "github.com/pulumi/pulumi/pkg/v3/codegen/schema" diff --git a/dynamic/parameterize/args.go b/dynamic/parameterize/args.go index f213a590a..b1444f91a 100644 --- a/dynamic/parameterize/args.go +++ b/dynamic/parameterize/args.go @@ -54,10 +54,16 @@ func ParseArgs(args []string) (Args, error) { docsArg := args[1] upstreamRepoPath, found := strings.CutPrefix(docsArg, "upstreamRepoPath=") if !found { - return Args{}, fmt.Errorf("path based providers are only parameterized by 2 arguments: [upstreamRepoPath=]") + return Args{}, fmt.Errorf( + "path based providers are only parameterized by 2 arguments: " + + "[upstreamRepoPath=]", + ) } if upstreamRepoPath == "" { - return Args{}, fmt.Errorf("upstreamRepoPath must be set to a non-empty value: upstreamRepoPath=path/to/files") + return Args{}, fmt.Errorf( + "upstreamRepoPath must be set to a non-empty value: " + + "upstreamRepoPath=path/to/files", + ) } return Args{Local: &LocalArgs{Path: args[0], UpstreamRepoPath: upstreamRepoPath}}, nil }