
golang
qqCEM
这个作者很懒,什么都没留下…
展开
-
使用golang发送post请求
这里使用golang发送post请求获取zabbix API的token package main import ( "bytes" "fmt" "io/ioutil" "net/http" ) func httpPostJson() { jsonStr :=[]byte(`{"jsonrpc": "2.0", ...原创 2019-07-26 16:29:46 · 2058 阅读 · 0 评论 -
golang时间戳转日期
package handler import ( "fmt" "time" ) func Timastamp2Date() { //构造时间戳 timestamp := int64(1564035531) //转化所需模板 timeLayout := "2006-01-02 15:04:05" //进行格式化 datetim...原创 2019-08-29 14:06:29 · 2119 阅读 · 0 评论 -
golang的make文件
all: go build -o zproxy.exe main.go linux: setcgo setgoos setgoarch go build -o zproxy main.go setcgo: SET "CGO_ENABLED=0" setgoos: SET "GOOS=linux" setgoarch: ...原创 2019-09-10 11:28:56 · 252 阅读 · 0 评论