try building a package

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-26 21:48:42 -05:00
parent a314af7f8b
commit 32f18dde86
1 changed files with 10 additions and 1 deletions

11
http.go
View File

@ -73,8 +73,17 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
for _, dir := range c.Dirs {
log.Info("append dir", dir)
fmt.Fprintln(w, "append dir", dir)
me.dirs = append(me.dirs, dir)
var found bool = false
for _, d := range me.dirs {
if d == dir {
found = true
}
}
if ! found {
me.dirs = append(me.dirs, dir)
}
}
return
}
if tmp == "/start" {