首页
Go结构体生成
油价信息
ToDream
行动起来,活在当下
累计撰写
13
篇文章
累计创建
5
个标签
累计收到
0
条评论
栏目
目 录
CONTENT
最新文章
2023-11-16
Go interface 的应用
1. 声明一个 interface type UserInterface interface { SetInfo(username string, age int) GetUsername() (username string) GetAge() (age int) } 2. 创建一个
2023-11-16
34
0
0
2023-11-16
Go 链式调用封装设计
定义 type User struct { Username string `json:"username"` Age int `json:"age"` } func (t *User) SetUsername(username string
2023-11-16
31
0
0
2023-11-16
Go 编写单测
基于GF gtest 包 测试文件命名规则 测试文件必须以 *_test.go 结构方式命名 例如: demo_test.go 测试文件编写方式 函数名必须以 Test 开头参数 t *testing.T 示例 package demoTest func TestDemo (t *testing.
2023-11-16
41
0
0
1
2