mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
fmt: go fmt fileutil/file_test.go and function/function.go
This commit is contained in:
@@ -135,4 +135,4 @@ func TestReadFileByLine(t *testing.T) {
|
|||||||
if !reflect.DeepEqual(res, expected) {
|
if !reflect.DeepEqual(res, expected) {
|
||||||
utils.LogFailedTestInfo(t, "ReadFileByLine", path, expected, res)
|
utils.LogFailedTestInfo(t, "ReadFileByLine", path, expected, res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (f Fn) Curry(i interface{}) func(...interface{}) interface{} {
|
|||||||
|
|
||||||
// Compose compose the functions from right to left
|
// Compose compose the functions from right to left
|
||||||
func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{} {
|
func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{} {
|
||||||
return func(s... interface{}) interface{} {
|
return func(s ...interface{}) interface{} {
|
||||||
f := fnList[0]
|
f := fnList[0]
|
||||||
restFn := fnList[1:]
|
restFn := fnList[1:]
|
||||||
|
|
||||||
@@ -61,7 +61,6 @@ func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Delay make the function execution after delayed time
|
// Delay make the function execution after delayed time
|
||||||
func Delay(delay time.Duration, fn interface{}, args ...interface{}) {
|
func Delay(delay time.Duration, fn interface{}, args ...interface{}) {
|
||||||
time.Sleep(delay)
|
time.Sleep(delay)
|
||||||
|
|||||||
Reference in New Issue
Block a user