Skip to content

Commit

Permalink
fix(lint): pre-allocating repl
Browse files Browse the repository at this point in the history
  • Loading branch information
harry-hov committed Mar 1, 2023
1 parent 37b0ecf commit f72d529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/gnolang/gnomod/gnomod.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func GnoToGoMod(f File) (*File, error) {
// Since we already fetched and replaced replacement modules
// with `/pkg/gnomod/...` path.
// Ignore leftovers.
var repl []*modfile.Replace
repl := make([]*modfile.Replace, 0, len(f.Replace))
for _, r := range f.Replace {
if !modfile.IsDirectoryPath(r.New.Path) {
continue
Expand Down

0 comments on commit f72d529

Please sign in to comment.