Introduce FilepathPathBridge

This commit introduces the new interface FilepathPathBridge to remove some code that differs only in their use of either the path or filepath package.
This commit is contained in:
bep 2015-01-27 11:44:41 +01:00
parent 5f9596e68c
commit bedc2d8488
3 changed files with 85 additions and 37 deletions

View file

@ -461,7 +461,7 @@ func TestFileAndExt(t *testing.T) {
}
for i, d := range data {
file, ext := FileAndExt(filepath.FromSlash(d.input))
file, ext := FileAndExt(filepath.FromSlash(d.input), filepathBridge)
if d.expectedFile != file {
t.Errorf("Test %d failed. Expected filename %q got %q.", i, d.expectedFile, file)
}