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

Function addImportFn

cmd/go-post/import_test.go:409–420  ·  view source on GitHub ↗
(path ...string)

Source from the content-addressed store, hash-verified

407}
408
409func addImportFn(path ...string) func(*ast.File) bool {
410 return func(f *ast.File) bool {
411 fixed := false
412 for _, p := range path {
413 if !imports(f, p) {
414 addImport(f, p)
415 fixed = true
416 }
417 }
418 return fixed
419 }
420}
421
422func deleteImportFn(path string) func(*ast.File) bool {
423 return func(f *ast.File) bool {

Callers 1

import_test.goFile · 0.85

Calls 2

importsFunction · 0.85
addImportFunction · 0.85

Tested by

no test coverage detected