Skip to content

Instantly share code, notes, and snippets.

@sadhasivam
Created November 23, 2020 00:04
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save sadhasivam/9d3ae068c569e92ba1efeff2a8befeed to your computer and use it in GitHub Desktop.
Save sadhasivam/9d3ae068c569e92ba1efeff2a8befeed to your computer and use it in GitHub Desktop.
Golang Interview Questions
  • Installation: 1- Explain how Go path works? 2- What are the benefits of Go Module (reference its commands)?

  • Concurrency: 1- Explain Concurrency & when to use it? 2- How would you allow communication between goroutines in Go? 3- How would you manage their access to resources?

  1. why do you use Go (my answer was as simple as "why i shouldn't", and some extra points Grimacing face)
  2. which libraries I use for development (almost always using the std library
  3. error handling
  4. testing (testing techniques, benchmark testing)
  5. logging (whether using in app logging or sending logs to external service)
  6. concurrency patterns.
  7. monitoring (this is tend to be generic not specific to go)
  8. internal services communications (REST, gRPC, and/or Event Bus).
  9. MicroServices Architectures (this tend to be a generic not specific to go), which one I use the most?
  10. in case of using net/http. how to handle http methods, path parameters?
  • Buffered vs Unbuffered channels

  • What is a go routine

  • Fix a Deadlock in a code snippet

  • Implement a map allowing concurrent access

  • Compare emojis represented using runes and strings (I don’t recall this very well)

  • How would you implement rate limiting

  • Why are go routines so cheap when compared to normal threads?

  • What’s is the difference between concurrency and parallelism?

  • How Go’s garbage collection works?

The one interesting thing I can think of is that I was once asked about how to use channels as a work control mechanism (like for/select, or separately the quitChan pattern)

  1. What is the difference between goroutine and os thread?

  2. How Go GC works?

  3. What is goroutines

  4. How goroutines works

  5. What is channel and how it works

  6. What is the hardest about Go in your opinion

  7. Difference between Dep and GoMod

  8. Why does an empty interface can be used for all types ?

  9. Why is go’s memory footprint considerably less than Java’s ?

  10. Best practises when dealing with goroutines ?

  11. Go’s GC.

@deven96
Copy link

deven96 commented Aug 12, 2021

Perfect. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment