diff --git a/pkgs/gnolang/gnomod/gnomod.go b/pkgs/gnolang/gnomod/gnomod.go index c04e8ebb75a..b62073b00dd 100644 --- a/pkgs/gnolang/gnomod/gnomod.go +++ b/pkgs/gnolang/gnomod/gnomod.go @@ -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