From dcea6da353dc206d61e20d3bd9fa80b55ed0b9ab Mon Sep 17 00:00:00 2001 From: wb-wzc505509 Date: Tue, 29 Dec 2020 18:03:03 +0800 Subject: [PATCH] fix sleep --- ChangeLog.txt | 3 +++ service/service.go | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index f9879da..f35f276 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,6 @@ +2020-12-29 Version: v1.3.8 +- Fix Sleep. + 2020-12-29 Version: v1.3.7 - Support go 1.11. diff --git a/service/service.go b/service/service.go index 1bd8a7b..ad97d31 100644 --- a/service/service.go +++ b/service/service.go @@ -401,9 +401,10 @@ func Is5xx(code *int) *bool { return tea.Bool(tmp >= 500 && tmp < 600) } -func Sleep(millisecond *int) { +func Sleep(millisecond *int) error { ms := tea.IntValue(millisecond) time.Sleep(time.Duration(ms) * time.Millisecond) + return nil } func ToArray(in interface{}) []map[string]interface{} {