Hi I am new to Golang …i have a simple query…Can we call goroutine from non main methods ?
In all the examples I have seen so far …all are calling from main() method only…
Hi I am new to Golang …i have a simple query…Can we call goroutine from non main methods ?
In all the examples I have seen so far …all are calling from main() method only…
Hi, @Subhash_Nair, when you say “call goroutine,” I assume you mean go f() where f is a function, which starts the function, f, in a new goroutine. If so, then yes, you can start goroutines outside of main.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.