summaryrefslogtreecommitdiff
path: root/applyPatch.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-30 10:28:04 -0600
committerJeff Carr <[email protected]>2025-01-30 10:28:04 -0600
commit7ea9732c8f433470fe427e2a263e4bec922865c2 (patch)
tree36341f34687fadb3fe37a2f6c730cbddffa55850 /applyPatch.go
parent50a56952417665d32147b55862bda0a6d6cee901 (diff)
old file gone
Diffstat (limited to 'applyPatch.go')
-rw-r--r--applyPatch.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/applyPatch.go b/applyPatch.go
index 5ad452d..a7c891e 100644
--- a/applyPatch.go
+++ b/applyPatch.go
@@ -5,6 +5,7 @@ package main
import (
"os"
"path/filepath"
+ "strings"
"go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
@@ -209,3 +210,20 @@ func handleBytes(bytes []byte) (*forgepb.Patchset, error) {
}
return pset, nil
}
+
+func doRegister(newurl string) error {
+ var url string
+ url = me.urlbase + "/register?url=" + newurl
+ body, err := me.forge.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
+}