1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

fmt: fix some gofmt issue

This commit is contained in:
dudaodong
2021-11-29 13:01:46 +08:00
parent 4848647918
commit 0c4b512084
14 changed files with 46 additions and 44 deletions

View File

@@ -2,7 +2,6 @@
// Use of this source code is governed by MIT license.
// Package fileutil implements some basic functions for file operations
package fileutil
import (
@@ -12,7 +11,7 @@ import (
"os"
)
// IsFileExists checks if a file or directory exists
// IsExist checks if a file or directory exists
func IsExist(path string) bool {
_, err := os.Stat(path)
if err == nil {
@@ -35,7 +34,7 @@ func CreateFile(path string) bool {
return true
}
// IsFileExists checks if the path is directy or not
// IsDir checks if the path is directory or not
func IsDir(path string) bool {
file, err := os.Stat(path)
if err != nil {
@@ -70,9 +69,8 @@ func CopyFile(srcFilePath string, dstFilePath string) error {
if err != nil {
if err == io.EOF {
return nil
} else {
return err
}
return err
}
}
}

View File

@@ -1,10 +1,11 @@
package fileutil
import (
"github.com/duke-git/lancet/utils"
"os"
"reflect"
"testing"
"github.com/duke-git/lancet/utils"
)
func TestIsExist(t *testing.T) {