Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 1806bd0

Browse files
author
Juanjo Alvarez
committed
Fix review nipickings :)
Signed-off-by: Juanjo Alvarez <[email protected]>
1 parent 39585ec commit 1806bd0

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

Gopkg.lock

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

driver/normalizer/normalizer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,14 @@ func (op opJoinNamesArray) Check(st *State, n nodes.Node) (bool, error) {
7171
}
7272

7373
tokens := strings.Split(string(s), "::")
74-
var qual = uast.QualifiedIdentifier{}
74+
var names []uast.Identifier
7575

7676
for _, t := range tokens {
7777
id := uast.Identifier{Name: t}
78-
qual.Names = append(qual.Names, id)
78+
names = append(names, id)
7979
}
8080

81-
n, err := uast.ToNode(qual.Names)
81+
n, err := uast.ToNode(names)
8282
if err != nil {
8383
return false, err
8484
}

driver/normalizer/normalizer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ func TestOpJoinNamesArray(t *testing.T) {
4444
n4, ok := n3.(nodes.String)
4545
require.True(t, ok)
4646
require.Equal(t, n1, n4)
47-
require.Equal(t, string(n4), "a::b::c")
47+
require.Equal(t, "a::b::c", string(n4))
4848
}

0 commit comments

Comments
 (0)