Home  >  Article  >  Backend Development  >  What are the data types in go language?

What are the data types in go language?

小老鼠
小老鼠Original
2023-12-14 14:35:56991browse

The data types of go language include basic data types and composite data types. Detailed introduction: 1. Basic data types include: integer, floating point, complex number, Boolean, and string; 2. Composite data types include: array, slice, map, channel, structure, interface, and function.

What are the data types in go language?

The operating system for this tutorial: Windows 10 system, go1.20.1 version, Dell G3 computer.

The data types of Go language include basic data types and composite data types.

Basic data types include:

Integer type (int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64)

Floating point type ( float32, float64)

Complex number type (complex64, complex128)

Boolean type (bool)

String (string)

Compound data types include:

array

slice

map

channel

struct )

Interface

Function

The above is the detailed content of What are the data types in go language?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn