From f08b63fa61a7fe823fa6494ecc4b5bbb6bb2f8a4 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Tue, 2 Jul 2024 19:40:28 +0400 Subject: [PATCH] fix: properly convert int to string I'm new to Go, sorry. Btw, IT WORKS NOW!! --- server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index 637a902..1684d65 100644 --- a/server.go +++ b/server.go @@ -6,6 +6,7 @@ import ( "database/sql" "fmt" "os" + "strconv" "strings" _ "github.com/mattn/go-sqlite3" @@ -84,7 +85,7 @@ func handler(ctx *fasthttp.RequestCtx) { ctx.Response.SetStatusCode(code) // -- find in FS and read headers+body - path := "storage/" + string(id) + path := "storage/" + strconv.Itoa(id) fh, err := os.Open(path + "/headers") if err != nil {