Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
guineveresaenger committed Dec 3, 2024
1 parent f80717e commit 332f450
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dynamic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 8 additions & 2 deletions dynamic/parameterize/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: <path> [upstreamRepoPath=<path/to/files>]")
return Args{}, fmt.Errorf(
"path based providers are only parameterized by 2 arguments: <path> " +
"[upstreamRepoPath=<path/to/files>]",
)
}
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
}
Expand Down

0 comments on commit 332f450

Please sign in to comment.