摘要:
1、什么是字符串❓ 是只读的字节数组 本质 字符串是不可变的 是一串连续的内存地址 内存表现 数据结构如下 // StringHeader is the runtime representation of a string. 是字符串的运行时表示。 // It cannot be used safe 阅读全文
摘要:
Go输出带指针的结构体 1、场景 当结构体带指针时,输出结构体,指针类型输出的是地址,而不是具体的值,例如 package main import "fmt" // Student 学生信息 type Student struct { Name *string Age *int Sex string 阅读全文