![](https://img-blog.csdnimg.cn/20190927151053287.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Go语言
专栏内容包括Go语言基础语法与实验案例
IT鹅
To be a practitioner of theory and technology. A self-driven cyber security researcher.The research interests including Software Vulnerability Analysis and excavation,Internet protocol security.Emali:hongjian@anyeziyuan.com Github:@pwn2security
展开
-
推荐:Go语言程序开发IDE
GolandGoland是Jetbrains家族的系列商业版本ide下载地址:GolandLiteIDE开源go语言IDE源码地址:Github下载地址:LiteIDEEclipse:安装插件:下载goclips插件 https://github.com/GoClipse/goclipse/blob/latest/documentation/Installation.md#installation配置插件Windows->Reference->Go(1)、配置 G原创 2021-09-11 12:28:16 · 1620 阅读 · 0 评论 -
Go语言并发与通道的运用
在go语言中我们可以使用goroutine 开启并发。goroutine 是轻量级线程,goroutine 的调度是由 Golang 运行时进行管理的。goroutine 语法格式:go 函数名( 参数列表 )实例1:package mainimport ( "fmt" "time")func say(s string) { for i := 0; i < 5; i++ { time.Sleep(100原创 2021-09-11 11:46:29 · 88 阅读 · 0 评论 -
Go 错误处理
Go 语言通过内置的错误接口提供了非常简单的错误处理机制。errors.new类型是一个接口:type error interface { Error() string}我们可以使用errors.new 返回错误信息:func Sqrt(f float64) (float64, error) { if f < 0 { return 0, errors.New("math: square root of negative number") }原创 2021-09-11 11:39:28 · 198 阅读 · 0 评论 -
go语言:解决main.go:2:7: expected ‘STRING‘, found ‘{‘问题最佳方案
请欣赏错误代码操作由于以前写c代码的习惯,经常使用{}正确写法将{}改成()圆括号原创 2021-08-28 16:04:10 · 3606 阅读 · 3 评论 -
Go程序编译教程
go语言作为一个c语言创始人发明的新兴语言,在区块链和游戏领域都身担重任,未来可期,未来go语言将会是主流,本文将介绍go语言的编译方式,具体可以查看官方文档demopackage mainimport "fmt"func main(){ fmt.Println("helloworld\n") var i int fmt.Println("i=",i) var num = 10.11 fmt.Println("num",num) name := "tom" fmt.Println("n原创 2021-08-21 17:31:08 · 8640 阅读 · 0 评论