MCPcopy Create free account
hub / github.com/decomp/decomp / rewriteImportFn

Function rewriteImportFn

cmd/go-post/import_test.go:447–458  ·  view source on GitHub ↗
(oldnew ...string)

Source from the content-addressed store, hash-verified

445}
446
447func rewriteImportFn(oldnew ...string) func(*ast.File) bool {
448 return func(f *ast.File) bool {
449 fixed := false
450 for i := 0; i < len(oldnew); i += 2 {
451 if imports(f, oldnew[i]) {
452 rewriteImport(f, oldnew[i], oldnew[i+1])
453 fixed = true
454 }
455 }
456 return fixed
457 }
458}

Callers 1

import_test.goFile · 0.85

Calls 2

importsFunction · 0.85
rewriteImportFunction · 0.85

Tested by

no test coverage detected