more start(droplet) debugging

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-27 02:55:36 -05:00
parent 32f18dde86
commit 53b18daea6
1 changed files with 6 additions and 3 deletions

View File

@ -71,15 +71,18 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "error =", err) fmt.Fprintln(w, "error =", err)
} }
for _, dir := range c.Dirs { for _, dir := range c.Dirs {
log.Info("append dir", dir)
fmt.Fprintln(w, "append dir", dir)
var found bool = false var found bool = false
for _, d := range me.dirs { for _, d := range me.dirs {
if d == dir { if d == dir {
found = true found = true
} }
} }
if ! found { if found {
log.Info("dir already here", dir)
fmt.Fprintln(w, "dir already here", dir)
} else {
log.Info("append new dir", dir)
fmt.Fprintln(w, "append new dir", dir)
me.dirs = append(me.dirs, dir) me.dirs = append(me.dirs, dir)
} }
} }