Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix slice init length #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions runtime/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func walkCommits(n *parser.NodeProgram, visitor *RuntimeVisitor) (*TableData, er
fields = builder.possibleTables[s.Tables[0]]
}
resultFields := fields // These are the fields in output with wildcards expanded
rows := make([]tableRow, s.Limit)
rows := make([]tableRow, 0, s.Limit)
usingOrder := false
if s.Order != nil && !s.Count {
usingOrder = true
Expand Down Expand Up @@ -107,7 +107,7 @@ func walkCommits(n *parser.NodeProgram, visitor *RuntimeVisitor) (*TableData, er

func metadataCommit(identifier string, commit *object.Commit) string {
key := ""
for key, _ = range builder.tables {
for key = range builder.tables {
break
}
table := key
Expand Down
4 changes: 2 additions & 2 deletions runtime/reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func walkReferences(n *parser.NodeProgram, visitor *RuntimeVisitor) (*TableData,
fields = builder.possibleTables[s.Tables[0]]
}

rows := make([]tableRow, s.Limit)
rows := make([]tableRow, 0, s.Limit)
usingOrder := false
if s.Order != nil && !s.Count {
usingOrder = true
Expand Down Expand Up @@ -88,7 +88,7 @@ func walkReferences(n *parser.NodeProgram, visitor *RuntimeVisitor) (*TableData,

func metadataReference(identifier string, ref *plumbing.Reference) string {
key := ""
for key, _ = range builder.tables {
for key = range builder.tables {
break
}
table := key
Expand Down
Loading