- Can you briefly describe the recent Golang project you worked on? What was your role and the main challenges you faced?
- What do you like most about developing in Golang compared to other languages you might know?
- Can you explain the difference between a slice and an array in Go? When would you use one over the other?
- How do Goroutines work in Go? Can you describe a situation where you used them effectively?
- What’s your understanding of channels in Go? Can you give a practical example of how you've used them?
- What happens when you use the defer keyword in Go? Can you explain its use case with an example?
- What’s the difference between make and new in Go? When would you use each?
- Have you developed any REST APIs using Go? Which framework or library did you use (Gin, Echo, Fiber, etc.), and why?
- How do you handle request validation in your APIs? Can you share an example of how you structured it?
- Can you explain how you implement middleware in Go? Maybe describe a middleware you have written.
- What’s your approach to error handling in a web application? Do you follow any best practices?
- What database(s) have you worked with in your Golang projects? How did you connect to them (libraries, tools)?
- How do you perform CRUD operations in Go? Can you describe a typical pattern or structure you use?
- Have you worked with transactions in Go’s database/sql package? Can you explain how you handle transactions?
- Have you encountered race conditions in Go? How did you detect and fix them?
- Have you used worker pools or implemented background jobs in Go? Can you describe how you did that?
- How do you write unit tests for your Golang code? Have you used any mocking libraries?
- Can you explain what table-driven testing is in Go, and why it’s useful?
- Have you ever used tools like the Go race detector or pprof? In what situations?
- How do you usually structure your Golang projects (folders, packages)?
- How do you manage environment variables and application configurations in Go?
- Do you follow any code conventions or best practices to write clean and maintainable Go code?
- Have you implemented authentication and authorization (like JWT) in Go? Can you explain how you did it?
- Do you have experience containerizing your Go applications with Docker? How do you optimize your Dockerfile for a Go app?