Skip to content

Commit 40a1396

Browse files
Fix gofmt and apply linter modernize suggestion
Co-authored-by: Isaac
1 parent cf73241 commit 40a1396

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

libs/dyn/dynvar/resolve_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,4 +422,3 @@ func TestResolveThreeLevelNestedVariableReference(t *testing.T) {
422422
require.NoError(t, err)
423423
assert.Equal(t, "${a_${b_z}}", getByPath(t, out, "final").MustString())
424424
}
425-

libs/interpolation/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ func Parse(s string) ([]Token, error) {
191191
// validatePath validates the path inside a ${...} reference by splitting on
192192
// '.' and validating each segment individually.
193193
func validatePath(path string) error {
194-
segments := strings.Split(path, ".")
195-
for _, seg := range segments {
194+
segments := strings.SplitSeq(path, ".")
195+
for seg := range segments {
196196
if seg == "" {
197197
return errors.New("invalid path")
198198
}

0 commit comments

Comments
 (0)