Add German translation of chapter 2
This commit is contained in:
52
de/02.8.md
52
de/02.8.md
@@ -1,32 +1,32 @@
|
||||
# 2.8 Summary
|
||||
# 2.8 Zusammenfassung
|
||||
|
||||
In this chapter, we mainly introduced the 25 Go keywords. Let's review what they are and what they do.
|
||||
In diesem Kapitel haben wir uns hauptsächlich mit den 25 Schlüsselwörtern in Go auseinandergesetzt. Schauen wir sie und ihre Funktionweise uns noch einmal an.
|
||||
|
||||
break default func interface select
|
||||
case defer go map struct
|
||||
chan else goto package switch
|
||||
const fallthrough if range type
|
||||
continue for import return var
|
||||
|
||||
- `var` and `const` are used to define variables and constants.
|
||||
- `package` and `import` are for package use.
|
||||
- `func` is used to define functions and methods.
|
||||
- `return` is used to return values in functions or methods.
|
||||
- `defer` is used to define defer functions.
|
||||
- `go` is used to start a new goroutine.
|
||||
- `select` is used to switch over multiple channels for communication.
|
||||
- `interface` is used to define interfaces.
|
||||
- `struct` is used to define special customized types.
|
||||
- `break`, `case`, `continue`, `for`, `fallthrough`, `else`, `if`, `switch`, `goto` and `default` were introduced in section 2.3.
|
||||
- `chan` is the type of channel for communication among goroutines.
|
||||
- `type` is used to define customized types.
|
||||
- `map` is used to define map which is similar to hash tables in other languages.
|
||||
- `range` is used for reading data from `slice`, `map` and `channel`.
|
||||
break default func interface select
|
||||
case defer go map struct
|
||||
chan else goto package switch
|
||||
const fallthrough if range type
|
||||
continue for import return var
|
||||
|
||||
- `var` und `const` werden benutzt, um Variablen und Konstanten zu definieren.
|
||||
- `package` und `import` sind für die Nutzung von Paketen nötig.
|
||||
- `func` wird zur Definition von Funktionen und Methoden verwendet.
|
||||
- `return` wird genutzt, um Werte von Funktionen und Methoden zurückzugeben.
|
||||
- `defer` wird genutzt, um Funktionen zu definieren, die als letzte Anweisung ausgeführt werden.
|
||||
- `go` definiert und startet eine neue Goroutine.
|
||||
- `select` erlaubt das Kommunizieren über mehrere Channels.
|
||||
- `interface` definiert ein Interface.
|
||||
- `struct` lässt uns speziell angepasste Datentypen erstellen.
|
||||
- `break`, `case`, `continue`, `for`, `fallthrough`, `else`, `if`, `switch`, `goto` und `default` wurden in Abschnitt 2.3 vorgestellt.
|
||||
- `chan` ist ein Datentypen für Channel, die es erlauben, zwischen Goroutinen zu kommunizieren.
|
||||
- `type` dient zur Erstellung eigener Datentypen.
|
||||
- `map` definiert eine Map, welche Hashtabellen in anderen Programmiersprachen ähneln.
|
||||
- `range` wird genutzt, um Daten aus einem `slice`, einer `map` oder einem`channel` zu erhalten.
|
||||
|
||||
If you understand how to use these 25 keywords, you've learned a lot of Go already.
|
||||
Wenn Du verstanden was, wie die 25 Schlüsselwörter einzusetzen sind, dann hast Du bereits eine Menge über Go gelernt.
|
||||
|
||||
## Links
|
||||
|
||||
- [Directory](preface.md)
|
||||
- Previous section: [Concurrency](02.7.md)
|
||||
- Next chapter: [Web foundation](03.0.md)
|
||||
- [Inhaltsverzeichnis](preface.md)
|
||||
- Vorheriger Abschnitt: [Nebenläufigkeit](02.7.md)
|
||||
- Nächstes Kapitel: [Grundlagen des Internets](03.0.md)
|
||||
Reference in New Issue
Block a user