随笔分类 -  golang

摘要:摘自:https://studygolang.com/articles/20714 channel的整体结构图 简单说明: buf是有缓冲的channel所特有的结构,用来存储缓存数据。是个循环链表 sendx和recvx用于记录buf这个循环链表中的~发送或者接收的~index lock是个互斥锁 阅读全文
posted @ 2021-07-22 17:14 泥土里的绽放 阅读(614) 评论(0) 推荐(0) 编辑
摘要:摘自:https://www.cnblogs.com/liuzhongchao/p/9159896.html 数组 数组是类型相同的元素的集合。例如,整数 5, 8, 9, 79, 76 的集合就构成了一个数组。Go不允许在数组中混合使用不同类型的元素(比如整数和字符串)。 声明 var varia 阅读全文
posted @ 2020-06-20 18:23 泥土里的绽放 阅读(312) 评论(0) 推荐(0) 编辑
摘要:VS Code断点调试Golang时候,弹出提示:Failed to continue: Check the debug console for details 点击Open launch.json,在env里面添加go.gopath路径 再把program的值修改为以下 为何把program的值从 阅读全文
posted @ 2019-11-13 10:37 泥土里的绽放 阅读(2389) 评论(0) 推荐(0) 编辑
摘要:xrom开发文档地址: http://gobook.io/read/github.com/go-xorm/manual-zh-CN/chapter-10/ golang基础知识: https://www.kancloud.cn/itfanr/go-by-example/81701 gin框架: ht 阅读全文
posted @ 2019-10-24 11:14 泥土里的绽放 阅读(269) 评论(0) 推荐(0) 编辑
摘要:指针基础知识package main import "fmt" func main() { var p *int p = new(int) *p = 1 fmt.Println(p, &p, *p)} 输出0xc04204a080 0xc042068018 1 在 Go 中 * 代表取指针地址中存的 阅读全文
posted @ 2019-10-24 11:13 泥土里的绽放 阅读(8316) 评论(0) 推荐(0) 编辑
摘要:This sample is for changing from “float64” to “int” for values did unmarshal using map[string]interface{}. When it did unmarshal using map[string]inte 阅读全文
posted @ 2019-10-21 12:00 泥土里的绽放 阅读(218) 评论(0) 推荐(0) 编辑