Skip to main content

Questions tagged [go-fiber]

Fiber is an Express inspired web framework built on top of Fasthttp, the fastest HTTP engine for Go.

-1 votes
0 answers
9 views

No DOM update with HTMX and GoLang

I'm trying to learn HTMX with Go and GoFiber. Here is my HTML page : <script src="https://unpkg.com/[email protected]" integrity="sha384-...
Baptiste LEROYER's user avatar
0 votes
0 answers
27 views

golang []map[string]interface{} key value map pair for html backend data set [closed]

data []map[string]interface{} I have data like this. I want to map the array as a key value in this data. I will give this data to HTML and html does not accept all data. I am using the html package. ...
user14184824's user avatar
0 votes
1 answer
58 views

Parsing path parameters dynamically from request url

I am working on a project using the fiber/v2 router, for a request mocking service. Now parameters passed via request body and query parameters are not an issue and handled easily. But here lies the ...
Aryan Gupta's user avatar
2 votes
1 answer
44 views

field define a valid foreign key for relations or implement the Valuer/Scanner interface

I have got this error . when I try to query define a valid foreign key for relations or implement the Valuer/Scanner interface This is my model struct. type SkuDetails struct { SkuID string ...
Ezilys's user avatar
  • 21
0 votes
0 answers
16 views

Fiber doesn't parse JSON payload properly

I'm implementing a POST request, which accepts JSON payload like this: { "channelCode": "6014", "trxDateTime": "2022-12-30T14:52:04+07:00", "...
anta40's user avatar
  • 6,653
-3 votes
1 answer
66 views

Browser doesn't save cookie

I'm using Go Fiber and it's session middleware for a simple authentication system. Every thing is working except that the browser doesn't save the cookie. my backend is served on https://127.0.0.1:...
Amirreza's user avatar
  • 423
1 vote
0 answers
83 views

How to Prevent Duplicate Entries in a Many-to-Many Relationship with Gorm

I'm working on a Go application using Gorm and Fiber, managing users and their languages in a many-to-many relationship. Below are my model definitions: type User struct { gorm.Model ID ...
meert's user avatar
  • 11
1 vote
0 answers
97 views

Websocket in Golang Fiber framework. Status Code: 426 Upgrade Required

May be I'll not provide you enough needed information. Please ask me to do then. I get 426 status code but my registered middleware(shown below) doesn't return error, vice versa it "says" ...
Yehor Tverytinov's user avatar
1 vote
2 answers
102 views

Go Fiber and HTMX - HX-Trigger header is changed to Hx-Trigger, which is not what HTMX is listening for

I have a very simple to-do app with a form and a list of to-dos, built in Fiber and HTMX. When the user adds a new to-do via the form, I want HTMX to refresh the list of todos. I know I can use hx-...
Kevin Whitaker's user avatar
1 vote
1 answer
109 views

ERROR: column "country" is of type text[] but expression is of type record (SQLSTATE 42804)

As a beginner, I want to know what I've did wrong in my code, I asked chatgpt, but it's not giving me good info. any help is appreciated. web-1 | 2024/03/31 14:26:43 /usr/src/app/handlers/ads.go:59 ...
Ryan's user avatar
  • 29
-2 votes
1 answer
65 views

Go template: Can't use HTML tag inside range block

I have a Go project use GoFiber and html template engine. When I give an array to range block in .html file, if between {{range .}} and {{end}} has no HTML tag, it runs. But when I add some, it seems ...
Ngoc Le's user avatar
  • 25
0 votes
0 answers
64 views

go get github.com/gofiber/fiber/v2 hang on go: downloading github.com/klauspost/compress v1.17.0

so I want to try fiber on go, but when I try to install the fiber go get github.com/gofiber/fiber/v2, the download process always hang on go: downloading github.com/klauspost/compress v1.17.0. I try ...
Amir's user avatar
  • 328
1 vote
0 answers
217 views

How to Grouping Endpoint by Middleware in Go Fiber?

I'm encountering an issue with route setup in Go using Fiber. app := fiber.New() app.Get("/", func(c *fiber.Ctx) error { return c.SendString("Hello, World!") }) ...
Adi Wahyudi's user avatar
1 vote
1 answer
742 views

golang pass fiber context to reqular context for graphql

In my golang project I am using Fiber (https://gofiber.io/) as a router and somewhere in code I am setting some values in fibers context. Now I am adding graphql (https://github.com/99designs/gqlgen) ...
Jack's user avatar
  • 909
0 votes
0 answers
36 views

GORM Go Fiber - Embed result of a join inside another embedded struct

So I am learning to build a REST API for a restaurant (so not actually for production). The database schema currently looks like this (other tables are unrelated): my current database schema which has ...
Klrfl's user avatar
  • 9

15 30 50 per page
1
2 3 4 5
14