golang: multiple http.writeHeader calls
摘要:背景:golang的http服务,读取文件,提供给client下载时候。出现multiple http.writeHeader calls 错误。func DownloadFile(w http.ResponseWriter, r *http.Request, sequence uint64, us...
阅读全文
posted @
2015-02-26 10:54
GZ.Jackey
阅读(3301)
推荐(0)
golang-imagick图片去除边框(黑边,白边,),添加中文字
摘要:图片去除边框(黑边,白边)package mainimport ( "fmt" "github.com/gographics/imagick/imagick" "io/ioutil" "os" "strconv")func ReadFile(path string) (...
阅读全文
posted @
2015-02-10 11:29
GZ.Jackey
阅读(2783)
推荐(0)
七牛云存储--内存put示例(go sdk)
摘要:啥都不说了,居然有文档,有git为啥不提供example?自己看代码,琢磨了一下,原来是要这么用的。这里不得不吐槽一下package的命名,为啥要去io?golang自带系统包名就有io啊,哥哥。从git上线下载包,go get -u github.com/qiniu/api然后,贴代码:packa...
阅读全文
posted @
2015-02-05 17:21
GZ.Jackey
阅读(1849)
推荐(0)