*: remove unnecessary fmt.Sprint

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyu-Ho Lee
2017-05-15 13:23:31 -07:00
parent 74fd7709ad
commit e15020055e
2 changed files with 5 additions and 6 deletions

View File

@@ -15,7 +15,6 @@
package main
import (
"fmt"
"os"
"os/exec"
"path/filepath"
@@ -232,9 +231,9 @@ func existDir(fpath string) bool {
}
func archiveLogAndDataDir(logDir string, datadir string) error {
dir := filepath.Join(logDir, "failure_archive", fmt.Sprint(time.Now().Format(time.RFC3339)))
dir := filepath.Join(logDir, "failure_archive", time.Now().Format(time.RFC3339))
if existDir(dir) {
dir = filepath.Join(logDir, "failure_archive", fmt.Sprint(time.Now().Add(time.Second).Format(time.RFC3339)))
dir = filepath.Join(logDir, "failure_archive", time.Now().Add(time.Second).Format(time.RFC3339))
}
if err := fileutil.TouchDirAll(dir); err != nil {
return err