Created
June 24, 2018 16:03
-
-
Save cyantarek/264c96d4b50dab730f914ef54e903c14 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
countFruit("Apple") | |
countFruit("Orange") | |
} | |
func countFruit(name string) { | |
for i:= 1; true; i++ { | |
fmt.Println(name) | |
time.Sleep(time.Second * 1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment