From 6ab4fca433d617478f63eea4e64bc3ec8916ba1b Mon Sep 17 00:00:00 2001 From: dudaodong Date: Sun, 26 Dec 2021 21:41:46 +0800 Subject: [PATCH] fmt: go fmt fileutil/file_test.go and function/function.go --- fileutil/file_test.go | 2 +- function/function.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fileutil/file_test.go b/fileutil/file_test.go index 462867b..c5890d7 100644 --- a/fileutil/file_test.go +++ b/fileutil/file_test.go @@ -135,4 +135,4 @@ func TestReadFileByLine(t *testing.T) { if !reflect.DeepEqual(res, expected) { utils.LogFailedTestInfo(t, "ReadFileByLine", path, expected, res) } -} \ No newline at end of file +} diff --git a/function/function.go b/function/function.go index 1ece80e..109b8e6 100644 --- a/function/function.go +++ b/function/function.go @@ -49,7 +49,7 @@ func (f Fn) Curry(i interface{}) func(...interface{}) interface{} { // Compose compose the functions from right to left func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{} { - return func(s... interface{}) interface{} { + return func(s ...interface{}) interface{} { f := fnList[0] restFn := fnList[1:] @@ -61,7 +61,6 @@ func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) in } } - // Delay make the function execution after delayed time func Delay(delay time.Duration, fn interface{}, args ...interface{}) { time.Sleep(delay)