From 0ac1491bfb5f9aebd4a08eaa3306c660b6f95662 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sun, 21 May 2023 19:41:41 +0300 Subject: [PATCH] cleanup cc #1026 --- copy.go | 6 +++--- eval.go | 2 +- opts.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/copy.go b/copy.go index 1365fe00..bdba8115 100644 --- a/copy.go +++ b/copy.go @@ -2,10 +2,10 @@ package main import ( "fmt" + "github.com/djherbis/times" "io" "os" "path/filepath" - "github.com/djherbis/times" ) func copySize(srcs []string) (int64, error) { @@ -84,8 +84,8 @@ func copyFile(src, dst string, info os.FileInfo, nums chan int64) error { if preserve_timestamps { ts := times.Get(info) - mtime := info.ModTime(); - atime := ts.AccessTime(); + mtime := info.ModTime() + atime := ts.AccessTime() if err := os.Chtimes(dst, atime, mtime); err != nil { os.Remove(dst) return err diff --git a/eval.go b/eval.go index f9e344ec..db8475ac 100644 --- a/eval.go +++ b/eval.go @@ -505,7 +505,7 @@ func (e *setExpr) eval(app *app, args []string) { return } toks := strings.Split(e.val, ":") - for _,s := range toks { + for _, s := range toks { switch s { case "mode", "timestamps": default: diff --git a/opts.go b/opts.go index c4779f0e..58c1532c 100644 --- a/opts.go +++ b/opts.go @@ -137,7 +137,7 @@ func init() { gOpts.history = true gOpts.info = nil gOpts.ruler = []string{"acc", "progress", "selection", "filter", "ind"} - gOpts.preserve= []string{"mode"} + gOpts.preserve = []string{"mode"} gOpts.shellopts = nil gOpts.sortType = sortType{naturalSort, dirfirstSort} gOpts.tempmarks = "'"