Slack Community
Articles
Jobs
Events
Guidelines
Post a Job
Join Our Slack
Home
Articles
Should You Return Empty or Nil Slices in Go?
Source: blog.boot.dev
Should You Return Empty or Nil Slices in Go?
2 years ago
In Go, we often need to return zero values. Idiomatic Go encourages the use of guard clauses, and guard clauses necessitate the need to return early. When returning early with an error, by convention all other return values should be zero values.
Read Full Article On blog.boot.dev
Related Articles
Community Partners
DevOps Careers
Want your job here? Contact Us.