jesus. magic in 6 lines
This commit is contained in:
parent
1e9ee55a8e
commit
0700306530
10
send.go
10
send.go
|
@ -15,8 +15,14 @@ func send() {
|
||||||
|
|
||||||
func pingStatus() error {
|
func pingStatus() error {
|
||||||
var url string
|
var url string
|
||||||
url = urlbase + "/status"
|
url = urlbase + "/status?hostname=stuff"
|
||||||
body, err := httpPost(url, nil)
|
msg, err := me.packages.Marshal()
|
||||||
|
if err != nil {
|
||||||
|
log.Info("proto.Marshal() failed:", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
log.Info("proto Marshal len =", len(msg))
|
||||||
|
body, err := httpPost(url, msg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Info("httpPost() failed:", err)
|
log.Info("httpPost() failed:", err)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue