Go TutorialLesson 9Free preview
Go Data Types
This lesson is part of Go · All levels
Summary
This study grouped primitive data types into Go: strings, various int and uint variants, float32 as well as float64, bool, byte, and rune. Go does not perform type conversion implicitly, so it needs explicit writing such as float64(x). Each type has a zero value that is automatically filled in when the variable has not been assigned a value.
Key points
- The basic types of Go include strings, int, uint, float, bool, byte, and rune
- Byte is the alias uint8 (one byte) while rune is the alias int32 (one Unicode character)
- Go prohibits implicit type conversion; conversions must be written explicitly
- Bool can only be worth true or false
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.