最近发布的主题
暂无
最近发布的文章
暂无
最近分享的资源
暂无
最近发布的项目
暂无
最近的评论
-
SetReadDeadline(time.Time{})。具体可以看 $GOROOT/src/net/net.go
-
使用http的multipart,参考 https://astaxie.gitbooks.io/build-web-application-with-golang/content/zh/04.5.html
-
评论了主题 import中的_""怎么破#3楼 @williamzhang import 包的时候 调用,全局变量也是
-
defer后面是 函数调用。而return 返回一个函数,这2者明显是有区别的。 func() { } 则是定义一个匿名函数。 func() { }() 则是定义一个匿名函数并调用执行。
-
评论了主题 go调用c函数出错>The message is confusing, until you realize that the ... is the variadic portion of a C function. You can't use C variadic >functions directly from Go, so you'll have to write a small wrapper in C to call http://stackoverflow.com/questions/26852407/unexpected-type-with-cgo-in-go package main /* #include <stdio.h> void myprintf(char *s) { printf("%s\n", s); } */ import "C" func main() { path := C.CString("/home/yanhao/1.txt") C.myprintf(path) }