summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-27 20:43:23 -0600
committerJeff Carr <[email protected]>2024-12-28 20:01:58 -0600
commit7a8f54a192640c1a55db23f11ed8d8ca29cd1c22 (patch)
treedad0478cf615ef7b57fd587ca27fb6976b1238a3 /main.go
parent37500b94969863a210c5f1cf334491d1f9b57d14 (diff)
compute the timestamps each time
Diffstat (limited to 'main.go')
-rw-r--r--main.go22
1 files changed, 3 insertions, 19 deletions
diff --git a/main.go b/main.go
index 6c3792b..df3b3ef 100644
--- a/main.go
+++ b/main.go
@@ -4,10 +4,10 @@ import (
"embed"
"fmt"
"net/http"
- "strings"
"time"
"go.wit.com/lib/protobuf/forgepb"
+ "go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
@@ -21,7 +21,7 @@ var resources embed.FS
// var accessf, clientf *os.File
var repoMap map[string]string
-var versionMap map[string]string
+var gitMap map[string]*gitpb.Repo
var configfile []string
var keysSorted []string
var forge *forgepb.Forge
@@ -40,7 +40,7 @@ func main() {
}
forge = forgepb.Init()
- versionMap = make(map[string]string)
+ gitMap = make(map[string]*gitpb.Repo)
repoMap = make(map[string]string)
/*
@@ -56,22 +56,6 @@ func main() {
readRepomap()
// readVersionFile()
- var vtime string
- var version string
- for gopath, thing := range versionMap {
- if tmp, ok := versionMap[gopath]; ok {
- // log.Info("gopath", gopath, "tmp", tmp)
- parts := strings.Fields(tmp)
- if len(parts) == 2 {
- // log.Info("GOT HERE gopath", gopath, "tmp", tmp)
- version = parts[0]
- vtime = parts[1]
- }
- }
- log.Info("gopath", gopath, "info", thing, "dur", vtime, "version", version)
- }
-
- log.Println("found log =", versionMap["go.wit.com/log"])
http.HandleFunc("/", okHandler)
// go https() // use caddy instead
p := fmt.Sprintf(":%d", argv.Port)