fix: properly convert int to string
I'm new to Go, sorry. Btw, IT WORKS NOW!!
This commit is contained in:
parent
453a6d3c71
commit
f08b63fa61
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ import (
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
_ "github.com/mattn/go-sqlite3"
|
_ "github.com/mattn/go-sqlite3"
|
||||||
|
@ -84,7 +85,7 @@ func handler(ctx *fasthttp.RequestCtx) {
|
||||||
ctx.Response.SetStatusCode(code)
|
ctx.Response.SetStatusCode(code)
|
||||||
|
|
||||||
// -- find in FS and read headers+body
|
// -- find in FS and read headers+body
|
||||||
path := "storage/" + string(id)
|
path := "storage/" + strconv.Itoa(id)
|
||||||
|
|
||||||
fh, err := os.Open(path + "/headers")
|
fh, err := os.Open(path + "/headers")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Add table
Reference in a new issue