From 111c6fd5deeefce80f269a71520d245e51e593ad Mon Sep 17 00:00:00 2001 From: DutchEllie Date: Tue, 19 Apr 2022 23:06:27 +0200 Subject: [PATCH] Removed debug messages --- src/guestbook.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/guestbook.go b/src/guestbook.go index b764da6..50b6923 100644 --- a/src/guestbook.go +++ b/src/guestbook.go @@ -208,8 +208,8 @@ func (g *guestbook) SmartLoadComments(ctx app.Context) { return } - fmt.Printf("hash: %v\n", hash) - fmt.Printf("lasthash: %v\n", lasthash) + //fmt.Printf("hash: %v\n", hash) + //fmt.Printf("lasthash: %v\n", lasthash) // If the hash is different, aka there was an update in the comments if !bytes.Equal(hash, lasthash) { @@ -225,7 +225,7 @@ func (g *guestbook) SmartLoadComments(ctx app.Context) { app.Log(err) return } - fmt.Printf("jsondata: %v\n", jsondata) + //fmt.Printf("jsondata: %v\n", jsondata) ctx.Dispatch(func(ctx app.Context) { err = json.Unmarshal(jsondata, &g.comments) if err != nil { @@ -239,7 +239,7 @@ func (g *guestbook) SmartLoadComments(ctx app.Context) { func (g *guestbook) LoadComments(ctx app.Context) { // TODO: maybe you can put this in a localbrowser storage? - fmt.Printf("Called LoadComments()\n") + //fmt.Printf("Called LoadComments()\n") url := ApiURL + "/comment" ctx.Async(func() { res, err := http.Get(url) @@ -264,9 +264,9 @@ func (g *guestbook) LoadComments(ctx app.Context) { ctx.LocalStorage().Set("comments", jsondata) // Calculating the hash - fmt.Printf("Calculating the hash from LoadComments\n") + //fmt.Printf("Calculating the hash from LoadComments\n") hash := sha256.Sum256(jsondata) - fmt.Printf("hash fresh from calculation: %v\n", hash) + //fmt.Printf("hash fresh from calculation: %v\n", hash) //g.lastHash = hash err = ctx.LocalStorage().Set("lasthash", []byte(fmt.Sprintf("%x\n", hash))) if err != nil {