Cleanup: reformat all Go files
Run `go fmt` on all files, to fix their formatting. No functional changes.
This commit is contained in:
parent
b20ede97ea
commit
44ec93275d
@ -90,7 +90,7 @@ func NewCommandExecutor(cli CommandLineRunner, listener CommandListener, timeSer
|
|||||||
|
|
||||||
// file-management
|
// file-management
|
||||||
"move-directory": ce.cmdMoveDirectory,
|
"move-directory": ce.cmdMoveDirectory,
|
||||||
"copy-file": ce.cmdCopyFile,
|
"copy-file": ce.cmdCopyFile,
|
||||||
}
|
}
|
||||||
|
|
||||||
return ce
|
return ce
|
||||||
|
@ -215,7 +215,6 @@ func fileCopy(src, dest string) (error, string) {
|
|||||||
return nil, msg
|
return nil, msg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func fileExists(filename string) bool {
|
func fileExists(filename string) bool {
|
||||||
_, err := os.Stat(filename)
|
_, err := os.Stat(filename)
|
||||||
return !errors.Is(err, fs.ErrNotExist)
|
return !errors.Is(err, fs.ErrNotExist)
|
||||||
|
@ -345,7 +345,6 @@ func TestCmdCopyFileDestinationExists(t *testing.T) {
|
|||||||
assert.Error(t, f.run())
|
assert.Error(t, f.run())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func TestCmdCopyFileSourceIsDir(t *testing.T) {
|
func TestCmdCopyFileSourceIsDir(t *testing.T) {
|
||||||
f := newCmdCopyFileFixture(t)
|
f := newCmdCopyFileFixture(t)
|
||||||
defer f.finish(t)
|
defer f.finish(t)
|
||||||
@ -372,7 +371,6 @@ func TestCmdCopyFileSourceIsDir(t *testing.T) {
|
|||||||
assert.Error(t, f.run())
|
assert.Error(t, f.run())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func newCmdCopyFileFixture(t *testing.T) cmdCopyFileFixture {
|
func newCmdCopyFileFixture(t *testing.T) cmdCopyFileFixture {
|
||||||
mockCtrl := gomock.NewController(t)
|
mockCtrl := gomock.NewController(t)
|
||||||
ce, mocks := testCommandExecutor(t, mockCtrl)
|
ce, mocks := testCommandExecutor(t, mockCtrl)
|
||||||
@ -414,7 +412,7 @@ func (f cmdCopyFileFixture) run() error {
|
|||||||
cmd := api.Command{
|
cmd := api.Command{
|
||||||
Name: "copy-file",
|
Name: "copy-file",
|
||||||
Parameters: map[string]interface{}{
|
Parameters: map[string]interface{}{
|
||||||
"src": f.absolute_src_path,
|
"src": f.absolute_src_path,
|
||||||
"dest": f.absolute_dest_path,
|
"dest": f.absolute_dest_path,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user