坚持为自己每月写1篇笔记

Retreat Hell!
We Just Got Here.

随笔分类 -  Golang

GO 语言相关
摘要:通过嵌套接口嵌套结构体实现OOP package main import "fmt" type aaa interface { man() } type bbb interface { women() } type tryinter interface { aaa bbb } type People 阅读全文
posted @ 2021-10-20 11:06 l||||||l 阅读(319) 评论(0) 推荐(0)
摘要:代码 package main import ( "bytes" "encoding/json" "fmt" "net/http" ) type BaseJsonBean struct { Status string `json:"status"` } func main() { fmt.Print 阅读全文
posted @ 2021-10-09 17:35 l||||||l 阅读(166) 评论(0) 推荐(0)
摘要:golang初级面试: new和make之间的区别? 例子: var temp []int // 相当于给 temp 变量分配了结构类型,没有分配底层数组 // 所以 data = nil、存储个数为0,容量也是0 var temp []int = make([]int, 4, 8) temp = 阅读全文
posted @ 2021-04-28 16:50 l||||||l 阅读(866) 评论(0) 推荐(0)