摘要: 一、go获取程序参数及指针地址示例 package main import ( "fmt" "os" ) func main() { fmt.Println(os.Args); if len(os.Args) > 1{ fmt.Println("Hi", os.Args[1]) }else { fm 阅读全文
posted @ 2019-03-05 16:05 arun_python 阅读(64) 评论(0) 推荐(0) 编辑
摘要: 众所周知gdb是c/c++下比较常用的debug工具,同样它也可以用于golang的调试. 一、 (1)Golang 官方文档对gdb使用的文档 https://golang.org/doc/gdb?spm=a2c4e.11153940.blogcont199077.8.121f50d5c4E09w 阅读全文
posted @ 2019-03-05 16:04 arun_python 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 众所周知,python有pdb,c/c++有gdb等工具,golang有没有一款类似的工具呢,答案是肯定的,下面说下dlv工具的用法 Office Website https://github.com/go-delve/delve 一、 (1)安装<mac/linux> 安装完成后记着find下dl 阅读全文
posted @ 2019-03-05 15:31 arun_python 阅读(618) 评论(0) 推荐(0) 编辑
摘要: 一、go获取程序参数及指针地址示例 (1)go run helloworld.go (2)go build helloworld.go && ./hellowold 注意事项:main函数没有参数和返回值 二、编写测试go测试程序 1.源码文件以_test结尾: xxx_test.go 2.测试方法 阅读全文
posted @ 2019-03-05 09:05 arun_python 阅读(291) 评论(0) 推荐(0) 编辑