Cleanup: reformat all Go files

Run `go fmt` on all files, to fix their formatting.

No functional changes.
This commit is contained in:
Sybren A. Stüvel 2023-07-10 10:58:14 +02:00
parent b20ede97ea
commit 44ec93275d
3 changed files with 3 additions and 6 deletions

View File

@ -90,7 +90,7 @@ func NewCommandExecutor(cli CommandLineRunner, listener CommandListener, timeSer
// file-management
"move-directory": ce.cmdMoveDirectory,
"copy-file": ce.cmdCopyFile,
"copy-file": ce.cmdCopyFile,
}
return ce

View File

@ -215,7 +215,6 @@ func fileCopy(src, dest string) (error, string) {
return nil, msg
}
func fileExists(filename string) bool {
_, err := os.Stat(filename)
return !errors.Is(err, fs.ErrNotExist)

View File

@ -345,7 +345,6 @@ func TestCmdCopyFileDestinationExists(t *testing.T) {
assert.Error(t, f.run())
}
func TestCmdCopyFileSourceIsDir(t *testing.T) {
f := newCmdCopyFileFixture(t)
defer f.finish(t)
@ -372,7 +371,6 @@ func TestCmdCopyFileSourceIsDir(t *testing.T) {
assert.Error(t, f.run())
}
func newCmdCopyFileFixture(t *testing.T) cmdCopyFileFixture {
mockCtrl := gomock.NewController(t)
ce, mocks := testCommandExecutor(t, mockCtrl)
@ -414,7 +412,7 @@ func (f cmdCopyFileFixture) run() error {
cmd := api.Command{
Name: "copy-file",
Parameters: map[string]interface{}{
"src": f.absolute_src_path,
"src": f.absolute_src_path,
"dest": f.absolute_dest_path,
},
}