(p1 string, p2 string)
| 430 | } |
| 431 | |
| 432 | func addDelImportFn(p1 string, p2 string) func(*ast.File) bool { |
| 433 | return func(f *ast.File) bool { |
| 434 | fixed := false |
| 435 | if !imports(f, p1) { |
| 436 | addImport(f, p1) |
| 437 | fixed = true |
| 438 | } |
| 439 | if imports(f, p2) { |
| 440 | deleteImport(f, p2) |
| 441 | fixed = true |
| 442 | } |
| 443 | return fixed |
| 444 | } |
| 445 | } |
| 446 | |
| 447 | func rewriteImportFn(oldnew ...string) func(*ast.File) bool { |
| 448 | return func(f *ast.File) bool { |
no test coverage detected