DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Inanc Gumus
Inanc Gumus

Posted on • Updated on

🐣 Go Funcsβ€Šβ€”β€ŠBaby-Gopher’s Visual Guide

What is inside?

  • How to declare a Go function?
    • Parameters
    • Signature
    • Body
    • Return keyword
    • Block
  • Func Parameters and Result Types Examples
    • Niladic Funcs
    • Singular Funcs
    • Multiple input params and result types
    • Example with an error value
    • Discarding the result values
    • Named result param and the naked return
    • The shadowing problem
    • Pass-by-value
    • Pass-by-value and the pointers
  • Naming Funcs
    • Be a Minimalist
    • Name in MixedCaps
    • Descriptive param names
    • Use verbs
    • Use is / are
    • Omit types in the name
    • Getters and Setters
  • Some things Go funcs don’t support

β˜… Click here to read the guide.

See you next Friday!

Top comments (0)

Become a Moderator Do you want us to help make DEV a better place?

Fill out this survey and help us by becoming a tag moderator here at DEV.