![](https://img-blog.csdnimg.cn/20190927151043371.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Go
Go
黑虎含珠
这个作者很懒,什么都没留下…
展开
-
用Gogland开发Go程序
以前开发go语言程序都是用IntelliJ IDEA加上go插件来开发的,今天偶然间发现jetbrains公司已经推出了Gogland IDE,果断下载偿试。我的环境是win10 64位。首先下载并安装Go SDK,并设置环境变量GOROOT=e:\Go\GoLang下载并安装Goglandhttps://www.jetbrains.com/go/原创 2017-03-01 23:05:30 · 10543 阅读 · 0 评论 -
Go web framework
go webframework 性能测试报告https://github.com/smallnest/go-web-framework-benchmark原创 2017-10-28 20:12:26 · 645 阅读 · 0 评论 -
Go WebServer Example
package mainimport ( //"fmt" "net/http" "log" "io")type WebServerHandler struct {}func (ws WebServerHandler) ServeHTTP(w http.ResponseWriter, req *http.Request){ //fmt.Fprintln(w, "hello原创 2017-08-01 17:41:04 · 465 阅读 · 0 评论 -
使用Go开发gRPC
环境:ubuntu 16.04 64位安装Go安装过程省略。安装完成后设置环境变量开发工具Gogland安装过程省略。安装gRPCgo get google.golang.org/grpc以上过程需要翻墙安装成功后,会在GOPATH的第一个目录保存相关文件。安装protoc和go plug-in下载prot原创 2017-07-19 15:22:22 · 988 阅读 · 0 评论 -
Go的组合继承
package mainimport "fmt"// 定义Persontype Person struct { name string}// 定义方法func (p *Person) show() { fmt.Println("name=" + p.name) p.print()}func (p *Person) print() { fmt.Println("Per原创 2017-07-31 17:13:40 · 487 阅读 · 0 评论 -
Go 方法的receiver和*receiver的区别
package mainimport ( "fmt")type Person struct { Name string}func (p *Person) SetName1() { p.Name = "chf1"}func (p Person) SetName2() { p.Name = "chf2"}func main() { p1 := &Person{原创 2017-06-22 10:21:36 · 1044 阅读 · 0 评论 -
Go Lambda
package mainimport "fmt"func main() { array := []int{1, 2, 3} fun := func(i,v int){ fmt.Printf("idx:%d value:%d \n", i, v) } for idx, val := range array{ fun(idx, val) }}原创 2017-06-21 22:53:34 · 10577 阅读 · 0 评论 -
GO tcp server demo
很以前用golang开发的tcp server demo原创 2017-04-01 17:49:04 · 1085 阅读 · 0 评论 -
go调用动态链接库dll/so
package mainimport "syscall"func main() { // test.dll // int add(int x, int y) h, err := syscall.LoadLibrary("test.dll") if (err != nil){ panic(err.Error()) } defer syscall.FreeLibrary(h)原创 2017-03-13 16:38:41 · 5997 阅读 · 3 评论 -
Go worker并发模式
Go语言借助于goroutine和channel可以非常方便的处理并发任务。package mainimport "fmt"import "time"// go goroutinefunc worker(id int, jobs chan int, results chan<- int) { for j := range jobs {原创 2017-03-05 20:39:25 · 3745 阅读 · 0 评论 -
编程语言代码编写指南
google官方https://github.com/google/styleguide中文翻译http://zh-google-styleguide.readthedocs.io/en/latest/原创 2017-02-05 11:27:14 · 953 阅读 · 0 评论