Skip to content

Commit

Permalink
ParsePathSpec: Using var block
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Hinderberger committed Jun 17, 2024
1 parent beb5c40 commit e964955
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/lib/util/path_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ type PathSpec struct {
// The string takes the format "[n]@file.json". Invalid path specs
// result in an error.
func ParsePathSpec(s string) (*PathSpec, error) {
var ok bool
var err error
var parallelRuns string
var spec PathSpec
var (
ok bool
err error
parallelRuns string
spec PathSpec
)

parallelRuns, spec.Path, ok = strings.Cut(s, "@")
if parallelRuns != "" {
Expand Down

0 comments on commit e964955

Please sign in to comment.