jesus. magic in 6 lines

This commit is contained in:
Jeff Carr 2024-11-15 19:52:46 -06:00
parent 1e9ee55a8e
commit 0700306530
1 changed files with 8 additions and 2 deletions

10
send.go
View File

@ -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