summaryrefslogtreecommitdiff
path: root/send.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-24 01:54:33 -0600
committerJeff Carr <[email protected]>2024-12-24 01:54:33 -0600
commitbd332301bea8c53d9ee1fe8da79da3c19176fbf2 (patch)
tree2aff858da422cdc04885f4c7fd14a28319d4c84f /send.go
parentc5fcb2a6c05293cd6e14b3bd1e91237013508d44 (diff)
use subcommands
Diffstat (limited to 'send.go')
-rw-r--r--send.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/send.go b/send.go
index b04b503..24db913 100644
--- a/send.go
+++ b/send.go
@@ -51,6 +51,23 @@ func listPatches() error {
return nil
}
+func doRegister(newurl string) error {
+ var url string
+ url = me.urlbase + "/register?url=" + newurl
+ body, err := httpPost(url, nil)
+ if err != nil {
+ log.Info("httpPost() failed:", err)
+ return err
+ }
+
+ test := strings.TrimSpace(string(body))
+ for _, line := range strings.Split(test, "\n") {
+ line = strings.TrimSpace(line)
+ log.Info("server returned:", line)
+ }
+ return nil
+}
+
func getPatch(pbfile string) error {
url := me.urlbase + "/patchsetget?filename=" + pbfile
log.Info("getPatch() url", url)