|
1 | | -# 2.8 Summary |
| 1 | +# 2.8 Resumo |
2 | 2 |
|
3 | | -In this chapter, we mainly introduced the 25 Go keywords. Let's review what they are and what they do. |
| 3 | +Neste capítulo introduzimos principalmente as 25 palavras-chave em Go. Vamos rever quais são elas e o que elas fazem. |
4 | 4 |
|
5 | 5 | break default func interface select |
6 | 6 | case defer go map struct |
7 | 7 | chan else goto package switch |
8 | 8 | const fallthrough if range type |
9 | 9 | continue for import return var |
10 | 10 |
|
11 | | --`var`and`const`are used to define variables and constants. |
12 | | --`package`and`import`are for package use. |
13 | | --`func`is used to define functions and methods. |
14 | | --`return`is used to return values in functions or methods. |
15 | | --`defer`is used to define defer functions. |
16 | | --`go`is used to start a new goroutine. |
17 | | --`select`is used to switch over multiple channels for communication. |
18 | | --`interface`is used to define interfaces. |
19 | | --`struct`is used to define special customized types. |
20 | | --`break`, `case`, `continue`, `for`, `fallthrough`, `else`, `if`, `switch`, `goto`and`default`were introduced in section 2.3. |
21 | | --`chan`is the type of channel for communication among goroutines. |
22 | | --`type`is used to define customized types. |
23 | | --`map`is used to define map which is similar to hash tables in other languages. |
24 | | --`range`is used for reading data from`slice`, `map`and`channel`. |
| 11 | +-`var`e`const`são usadas para definir variáveis e constantes. |
| 12 | +-`package`e`import`são para o uso de pacotes. |
| 13 | +-`func`é usada para definir funções e métodos. |
| 14 | +-`return`é usada para retornar valores em funções ou métodos. |
| 15 | +-`defer`é usada para definir funções defer (funções de adiamento). |
| 16 | +-`go`é usada para iniciar uma nova goroutine. |
| 17 | +-`select`é usada para alternar entre múltiplos canais para comunicação. |
| 18 | +-`interface`é usada para definir interfaces. |
| 19 | +-`struct`é usada para definir tipos personalizados. |
| 20 | +-`break`, `case`, `continue`, `for`, `fallthrough`, `else`, `if`, `switch`, `goto`e`default`foram introduzidas na seção 2.3. |
| 21 | +-`chan`é o tipo de canal para comunicação entre goroutines. |
| 22 | +-`type`é usada para definir tipos personalizados. |
| 23 | +-`map`é usada para definir um map (mapa) que é semelhante a tabelas hash em outras linguagens. |
| 24 | +-`range`é usada para ler dados de`slice`, `map`e`channel`. |
25 | 25 |
|
26 | | -If you understand how to use these 25 keywords, you've learned a lot of Go already. |
| 26 | +Se você entender como utilizar estas 25 palavras-chave, você já aprendeu bastante sobre Go. |
27 | 27 |
|
28 | 28 | ## Links |
29 | 29 |
|
30 | | --[Directory](preface.md) |
31 | | --Previous section: [Concurrency](02.7.md) |
32 | | --Next chapter: [Web foundation](03.0.md) |
| 30 | +-[Sumário](preface.md) |
| 31 | +-Seção anterior: [Concorrência](02.7.md) |
| 32 | +-Próximo Capítulo: [Web foundation](03.0.md) |
0 commit comments