Is it recommended to use global variables in a program that implements goroutines?
Answer / Dinesh Kumar Dubey
It's generally not recommended to use global variables when working with Goroutines because they can lead to concurrency issues and make the code harder to reason about.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the gopath environment variable?
What are the benefits of using go programming?
How can variable type be checked at the runtime?
What is type assertion in go?
How will you access command line arguments in a go program?
What is a string literal?
How is len() different from cap() function?
What are goroutines?
How to use custom packages in go language?
Write the syntax to create a function in go programming language?
What are the built-in supports?
Explain pointers in go?