What are Go's basic data types?

Beginner

Answer

Go's basic data types include:

Numeric types:

  • int, int8, int16, int32, int64
  • uint, uint8, uint16, uint32, uint64
  • float32, float64
  • complex64, complex128

Other basic types:

  • bool (true/false)
  • string (UTF-8 encoded)
  • byte (alias for uint8)
  • rune (alias for int32, represents Unicode code point)