(oldnew ...string)
| 445 | } |
| 446 | |
| 447 | func 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 | } |
no test coverage detected