![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
go
「已注销」
服务端开发一枚,使用go与Python
github地址:https://github.com/azi-v
展开
-
go中的for循环中各语句块执行顺序
for.go package forLoop import ( "fmt" ) // ForLoop for循环:三语句执行顺序 func ForLoop() { ok := true fmt.Println("start for ...") for fmt.Println("first express"); ok; fmt.Println("third express") { fmt.Println("for inner one line") ok = false fmt.Pr.原创 2020-11-30 11:49:53 · 610 阅读 · 0 评论 -
Go基础、标准库使用
cgo go使用分段栈,初始分配很小,可动态增长。在进入函数时,插入检测指令实现。 goroutine是协作式的,运行到调用runtime库时就有机会进行调度。 cgo包含从go调用c,从c中调用go 注意: C函数不是分段技术; cgo函数不是协作式的; C中不支持go的runtime; channel结构 channel是first-class(一等公民,一等), 可以存储到变量中, 可以作为参数传递给函数, 可以作为函数的返回值返回。 channel仅仅就是一个数据结构而已 struct Hc原创 2020-10-21 16:31:31 · 1033 阅读 · 1 评论