From a17786e98c0ab174108d7f99fd00f03ac28e58c5 Mon Sep 17 00:00:00 2001 From: filifa Date: Thu, 11 Jul 2024 22:15:01 -0500 Subject: [PATCH] change logging --- internal/statsapi/feed.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/statsapi/feed.go b/internal/statsapi/feed.go index 8c4550f..152fc21 100644 --- a/internal/statsapi/feed.go +++ b/internal/statsapi/feed.go @@ -54,6 +54,7 @@ func setValue(obj any, key string, value any) error { case map[string]any: log.Println("Formerly", v[key]) v[key] = value + log.Println("Now", v[key]) case []any: idx, err := strconv.Atoi(key) if err != nil { @@ -61,7 +62,9 @@ func setValue(obj any, key string, value any) error { } v = expand(v, idx) + log.Println("Formerly", v[idx]) v[idx] = value + log.Println("Now", v[idx]) default: err = errors.New("couldn't determine type") } @@ -101,7 +104,7 @@ func patch(obj any, path string, value any) error { func (f *FeedResponse) Patch(instr *instruction) { // TODO: need to handle each type of instruction separately: add, // replace, remove, copy, move - log.Println("updating", instr.Path, "to", instr.Value) + log.Println("updating", instr.Path) err := patch(f, instr.Path, instr.Value) if err != nil { log.Println(err)