摘要: package controllers import ( "github.com/astaxie/beego" "service/doc_admin/models" ) type PublicController struct { beego.Controller } func (this *PublicController) SendResponse(code i... 阅读全文
posted @ 2018-09-19 11:09 不做大哥很多年 阅读(938) 评论(0) 推荐(0) 编辑
摘要: package utils import ( "bytes" "log" "os/exec" ) func ExecuteCommand(dir, command string, command_args ...string) (string, error) { cmd := exec.Command(command, command_args...) ... 阅读全文
posted @ 2018-09-19 10:01 不做大哥很多年 阅读(729) 评论(0) 推荐(0) 编辑
摘要: package gzip import ( "compress/gzip" "errors" "fmt" "io" "log" "os" "path/filepath" "strings" "time" "utils" ) func fileToDecompress(gzfile, file string) string { ... 阅读全文
posted @ 2018-09-19 09:59 不做大哥很多年 阅读(3181) 评论(0) 推荐(0) 编辑
摘要: package utils import ( "bytes" "crypto/sha1" "encoding/json" "encoding/xml" "errors" "fmt" "io" "io/ioutil" "log" "net/url" "os" "os/exec" "path/filepath" "... 阅读全文
posted @ 2018-09-19 09:54 不做大哥很多年 阅读(943) 评论(0) 推荐(0) 编辑
摘要: import ( "log" ) func ShowError(err error) bool { if err != nil { log.Println(err) } return err != nil } func NoneError(err error) { if ShowError(err) { panic(err) } }... 阅读全文
posted @ 2018-09-19 09:53 不做大哥很多年 阅读(137) 评论(0) 推荐(0) 编辑