Skip to content

Commit 334375a

Browse files
committed
tmp: fix base filepath
1 parent c1df831 commit 334375a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/internal/generators/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package generators
55

66
import (
77
"fmt"
8-
"path"
8+
"path/filepath"
99
"strings"
1010

1111
"github.com/go-errors/errors"
@@ -110,7 +110,7 @@ func ParseFileSource(source string) (keyName, filePath string, err error) {
110110
numSeparators := strings.Count(source, "=")
111111
switch {
112112
case numSeparators == 0:
113-
return path.Base(source), source, nil
113+
return filepath.Base(source), source, nil
114114
case numSeparators == 1 && strings.HasPrefix(source, "="):
115115
return "", "", errors.Errorf("missing key name for file path %q in source %q", strings.TrimPrefix(source, "="), source)
116116
case numSeparators == 1 && strings.HasSuffix(source, "="):

0 commit comments

Comments
 (0)