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 {
|
||||
var url string
|
||||
url = urlbase + "/status"
|
||||
body, err := httpPost(url, nil)
|
||||
url = urlbase + "/status?hostname=stuff"
|
||||
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 {
|
||||
log.Info("httpPost() failed:", err)
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue