From b0a859aff41ce5ff7b203528cdfa4693f0907bb9 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Mon, 3 Dec 2018 11:23:25 +0800 Subject: [PATCH 1/2] optimize example code --- examples/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/main.go b/examples/main.go index 521172c..be8dfc3 100644 --- a/examples/main.go +++ b/examples/main.go @@ -33,14 +33,14 @@ import ( var sum int32 -func myFunc(i interface{}) error { +func myFunc(i interface{}) { n := i.(int32) atomic.AddInt32(&sum, n) fmt.Printf("run with %d\n", n) return nil } -func demoFunc() error { +func demoFunc() { time.Sleep(10 * time.Millisecond) fmt.Println("Hello World!") return nil From c181c305611e0a828473900e886ca0c813ec4482 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Mon, 3 Dec 2018 11:23:37 +0800 Subject: [PATCH 2/2] update readme files --- README.md | 4 ++-- README_ZH.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 38f287b..bf8ce85 100644 --- a/README.md +++ b/README.md @@ -52,14 +52,14 @@ import ( var sum int32 -func myFunc(i interface{}) error { +func myFunc(i interface{}) { n := i.(int32) atomic.AddInt32(&sum, n) fmt.Printf("run with %d\n", n) return nil } -func demoFunc() error { +func demoFunc() { time.Sleep(10 * time.Millisecond) fmt.Println("Hello World!") return nil diff --git a/README_ZH.md b/README_ZH.md index c3ffa88..966c205 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -51,14 +51,14 @@ import ( var sum int32 -func myFunc(i interface{}) error { +func myFunc(i interface{}) { n := i.(int32) atomic.AddInt32(&sum, n) fmt.Printf("run with %d\n", n) return nil } -func demoFunc() error { +func demoFunc() { time.Sleep(10 * time.Millisecond) fmt.Println("Hello World!") return nil