go20/day02/README.md
2026-01-11 10:51:09 +08:00

16 lines
824 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 复合数据结构
之前讲了基础类型接下来讲复合数据结构数组、结构体、切片、Map, 利用基础类型组装起来的类型称为复合数据结构
很多现实的场景 都是复合数据结构,比如:
+ 数组: ip地址 192.168.1.1 就是4个整数的数组
+ 切换(99): 长度不固定的数组, 一堆服务器ip ['192.168.1.1', '192.168.1.1', '192.168.1.1']
+ HashMap(字典, Map): 键值对{'key':'value', 'key':'value'}, 属性不固定的, 服务器{'cpu':'1核', 'mem':'1G', ip: [], ...}
+ 结构体(99): 键值对{'name':'bob', 'age':'18'}, 属性固定的, 服务器{'cpu':'1核', 'mem':'1G', ip: [], ...}
## 课程内容
+ [Go语言数组](./array/README.md)
+ [Go语言切片](./slice/README.md)
+ [Go语言Map](./map/README.md)
+ [Go语言结构体](./struct/README.md)