Created
June 24, 2018 16:12
-
-
Save cyantarek/47fe0c868f8f7bcf2cee89b316bb91c7 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