Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "time"
- )
- func main() {
- go middleFunc(8)
- // Don't care too much about this, I'm still looking at options to replace select {}
- select {}
- }
- // This exists because I might wanna call doStuff on other places, without being in a timer
- func middleFunc(a int){
- doStuff(a)
- time.Sleep(time.Second * 10)
- middleFunc(a)
- }
- func doStuff(a int){
- fmt.Println(a)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement