首页
沸点
课程
数据标注
HOT
AI Coding
更多
直播
活动
APP
插件
直播
活动
APP
插件
搜索历史
清空
创作者中心
写文章
发沸点
写笔记
写代码
草稿箱
创作灵感
查看更多
登录
注册
golang基础
littleCat
创建于2024-03-12
订阅专栏
golang基础
暂无订阅
共38篇文章
创建于2024-03-12
订阅专栏
默认顺序
默认顺序
最早发布
最新发布
golang so
https://blog.csdn.net/arv002/article/details/122955707 将go语言开发的程序编译成so[动态库文件]就可以给c或者c++程序调用. 如果想要导出C
补码 位运算 大端序 小端序
https://www.cnblogs.com/trmbh12/p/17773283.html 原来(10000000->1111111 表示 -127 -> -0),现在(10000000->111
golang schedule、go关键字、抢占
schedule() // One round of scheduler: find a runnable goroutine and execute it. // Never returns. fi
golang socket 编程
https://zhuanlan.zhihu.com/p/143346084 for 循环中 listen.Accept()
golang 编译器执行流程
https://go.dev/src/cmd/compile/README 1. Parsing cmd/compile/internal/syntax (lexer, parser, syntax
golang http
request 设置超时 https://gosamples.dev/http-client-timeout/ httpClient.Get 流程 Client.do 调用 c.send(req, d
golang gc
Note that escaping to the heap must also be transitive: if a reference to a Go value is written into
golang tcp 服务
启动 TCP 服务器 https://zhuanlan.zhihu.com/p/609629545 启动 tcp 服务的代码框架,伪代码如下: listen && bind sysSocket 中 s
golang云原生部署
1.应用程序容器镜像制作 dockerfile 编写 docker build -t username/hello:1.0.0 //非顶级镜像 必须用户名打头 docker push username
buffio flush
It's inefficient if we write to a file one character or word at a time. The write to file works best
singleflight
https://zhuanlan.zhihu.com/p/392975826 singleflightd的设计思路就是将一组相同的请求合并成一个请求,使用map存储,只会有一个请求到达mysql,使用
freecache
freecache https://zhuanlan.zhihu.com/p/487455942 FreeCache avoids GC overhead by reducing the number
sync Mutex RWMutex Cond
通过状态state和信号量来实现的。 协程1加锁的话,lock=1 协程2加锁的话,waiter=1,代表等待锁释放: 协程A主要是通过释放信号量来通知协程b,此时协程B可以加锁 state Lock
golang 栈扩容
https://cloud.tencent.com/developer/article/1700947 分段栈和连续栈 Go 1.3 版本前使用的栈结构是分段栈,随着goroutine 调用的函数层级
sync WaitGroup / Once / Map / Pool
WaitGroup WaitGroup 的整个调用过程可以简单地描述成下面这样 当调用 WaitGroup.Add(n)时,counter 将会自增:counter += n 当调用 WaitGrou
golang sema
semaRoot、semtable A semaRoot holds a balanced tree of sudog with distinct addresses (s.elem). Each o
goroutine 退出过程
// The top-most function running on a goroutine // returns to goexit+PCQuantum.
golang 面试题
字符串拼接 拼接字符串的方式有:+ , fmt.Sprintf , strings.Builder, bytes.Buffer, strings.Join 1 "+" 使用+操作符进行拼接时,会对字符
go 程序启动过程(bootstrap sequence)
osint schedinit runtime·mstart mstart0 --->Initialize stack bounds (if osStack)//8192 byte --->Initi
golang 内存管理、GC
Unmanaged memory In general, the runtime tries to use regular heap allocation. However, in some case
下一页