Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
Cap. 12 – Funções – 1. Sintaxe
Play lesson

Aprenda Go 🇧🇷 - Cap. 12 – Funções – 1. Sintaxe

5.0 (2)
47 learners

What you'll learn

This course includes

  • 21.3 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

- Qual a utilidade de funções? - Abstrair funcionalidade - Reutilização de código - func (receiver) identifier(parameters) (returns) { code } - A diferença entre parâmetros e argumentos: - Funções são definidas com parâmetros - Funções são chamadas com argumentos - Tudo em Go é *pass by value.* - Pass by reference, pass by copy, ... não. - Parâmetro pode ser ...variádico. - Exemplos: - Função básica. - Go Playground: https://play.golang.org/p/FebJblBenP - Função que aceita um argumento. - Go Playground: https://play.golang.org/p/CE6Ij3U4QB - Função com retorno. - Go Playground: https://play.golang.org/p/gKxwYe6btP - Função com múltiplos retornos e parâmetro variádico. - Go Playground: https://play.golang.org/p/OcQ1wXwM2c - Mais um: https://play.golang.org/p/8wc2TA9xH_

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere