userId or userID? Go has strong opinions about naming and most of them trip up newcomers: → Acronyms use consistent case: APIKey not ApiKey → ID not Id (it's an initialism) → camelCase for unexported, PascalCase for exported → Never snake_case, never SCREAMING_SNAKE_CASE → Avoid shadowing builtins like int, error, len → Stick to ASCII. Use pi, not π Alex Edwards just published a comprehensive guide with real examples covering all of this. Link in the comments ↓ #golang #programming #devops
Very good book though, when you know the basics of Go a bit and want to create something this book will help you a lot! Same with his other book about creating an API.
Full guide: https://www.alexedwards.net/blog/go-naming-conventions