Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
82 views

I am trying to build a SPA. There are some requirements I am desperately trying to achieve. I have an index.html file as a layout which has some templates defined. The rendering of that works as ...
ZeTr0nIx's user avatar
1 vote
1 answer
96 views

I have been dealing with an issue with the static files in the application I'm building in go using Echo framework, I can not get the files to load, I only get 404 for the static files. I have this in ...
Vlad Popescu's user avatar
1 vote
0 answers
105 views

Echo & Templ Response Issue I am trying to build an admin dashboard for my project using Echo V5 & Templ. My current setup // RegisterRoutes -> a route registeration method used to ...
Ahmad Hamdi's user avatar
  • 1,270
1 vote
0 answers
345 views

I'm planning use templ library like this github.com/a-h/templ v0.2.707 but there is problem where rendering html first will show you my code written so far: go.mod module cozy go 1.21.6 require ( ...
yun's user avatar
  • 33
1 vote
2 answers
917 views

I'm working on an Echo-based Go application where I'm using JWT for authentication. I've integrated the echo-jwt middleware and oapi-codegen for OpenAPI validation. However, I'm facing issues where ...
Coderlife's user avatar
2 votes
0 answers
867 views

i am trying to apply a format to my loggin, with request specific details in the format. EX: when i log "Test log" I should expected to be logged like: 2024-06-22T19:36:48+01:00 INFO [...
João Calhau's user avatar
2 votes
0 answers
114 views

I'm trying to pass the result of a google text to speech api SynthesizeSpeech.audio_content to frontend throught echo framework (golang). resp, err := client.SynthesizeSpeech(c.ctx, &req) if err !=...
MikaAll's user avatar
  • 153
1 vote
0 answers
592 views

I am starting a Go project using Echo and Templ. I have a project structure as follows: / /cmd main.go /static css style.css /view /layout base.templ The problem I am ...
Paul LeDuc's user avatar
1 vote
0 answers
790 views

I'm trying to add otel tracing to my Echo server. I'm basing my code on example but anything is not coming from application to Jaeger instance that i'm running locally. First, I've injected the ...
Arthur S's user avatar
3 votes
0 answers
1k views

Is there a anyway to validate if a field is present in a http request with the echo framwork? Lets take this code for example: type ExampleStruct struct { Name string `json:"name"` ...
PopSmoke's user avatar
1 vote
1 answer
836 views

In my main function I have used the go framework echo to create a Logger and Recover func main() { db := initDB("storage.db") migrate(db) e := echo.New() -> e.Use(...
Alfred Jijo's user avatar
-2 votes
1 answer
615 views

im trying to create an rest api with go/echo and postgres with raw sql but i cant make it work, no idea whats the problem the console prints the text in the title recipe.go func CreateRecipe(recipe *...
vfreis09's user avatar
1 vote
1 answer
290 views

I am building a web API with Echo Labstack framework. I have a middleware in my route to check for user authentication, but then I am having difficulty in passing the data to controller and could not ...
Charas's user avatar
  • 1,837
2 votes
1 answer
41 views

I am a Go newbie. I have written an API server built on the Echo server, using the DeepMap OpenAPI generator and Postgres using pgxpool. It is working well enough and has been in use for a year, but ...
Drew's user avatar
  • 121
1 vote
0 answers
92 views

I'm trying to make a proxy to download server files with an authentication layer. I'm using Golang (1.21.0) and Echo (4.11.1) Problem description When a user is downloading a big file, if I kill the ...
Doubidou's user avatar
  • 1,821
3 votes
2 answers
1k views

I want to Serve React App with react router dom with echo in Go. But I'm facing a problem in routing because if I directly go to that route I get not found error package main import ( "fmt&...
Aditya Nandwana's user avatar
1 vote
2 answers
5k views

I am using Echo web framework in Golang and I wrote this code package main import ( "github.com/labstack/echo/v4" "net/http" ) type ProjectPath struct { ID string `...
Sandeep Acharya's user avatar
1 vote
0 answers
345 views

I'm using echo-labstack and I'm implementing a JWT validation. I'd like the validating route to be unprotected by the JWT middleware but the route is a route like '/validate/:token'. Is there a way to ...
Suolumi's user avatar
  • 36
2 votes
2 answers
3k views

project folder ->templates ->t.tmpl ->examples ->html ->blocks ->... ->assets ->... ->index.html im t.tmpl there is call to <link rel="...
GhostVision's user avatar
1 vote
1 answer
1k views

I am building a REST API in golang using Echo. I have a handler function Temp that handles a Post request with some form-data. func NewBatchHandler(e *echo.Echo, us domain.BatchUsecase) { handler :...
mad's user avatar
  • 31
-1 votes
1 answer
248 views

I have Struct Type for binding SQL data to my struct variable. It has 2 Feilds as CenterCode and ActualCenterCode type LearnerModel struct { CenterCode dbr.NullString `json:"centerCode" ...
Omkar Chavan's user avatar
1 vote
1 answer
246 views

I use echo framework for building REST API. I receive file via http request and i need to send it to the next API service by post request. How i can do this without storing file? I've tried this way, ...
Danila Derzhavin's user avatar
1 vote
0 answers
347 views

I have a Golang Echo Server running on port 5050 using windows WSL. I can talk to the server perfectly fine from browser and through curl in a WSL terminal. // Start server go func() { ...
ar-siddiqui's user avatar
1 vote
1 answer
318 views

I'm in the process of making a simple REST API using Echo. I have a variable which is the following map, based on this struct I've made: type Checklist struct { ID int `json:&...
daikon-dev's user avatar
1 vote
1 answer
1k views

Let's say I have a REST API implemented with Golang Echo framework. I want to have a way to use optional query parameters in request. I want to use a Option[T] monad from samber/mo library. For ...
gensek's user avatar
  • 39
0 votes
1 answer
273 views

HTTP handler I have a HTTP handler like this: func RouteHandler(c echo.Context) error { outs := make([]io.Reader, 5) for i := range outs { outs[i] = // ... comes from a logic. } ...
Megidd's user avatar
  • 8,223
1 vote
0 answers
443 views

I am trying to design a small backend service in Go with the Echo library to record video from a webcam using GoCV. I would like to make a call to start the recording and one to stop it, whereas from ...
Luigi Gargioni's user avatar
1 vote
0 answers
490 views

I am currently building a Go application that needs to connect to multiple databases dynamically. For context I have 22 Databases (db1, db2, db3...) and the dbUser, dbPass and dbPort remains the same. ...
mad's user avatar
  • 31
1 vote
1 answer
1k views

When I made a request with context req, err := http.NewRequestWithContext(ctx, method, url, payload) Then, if I check the context in the service I can see the context I've sent. For example, in an ...
Jacob Wilfridovich's user avatar
1 vote
0 answers
646 views

I have ECHO server on GO and assigned on it Swagger. If I'm using the structure which is on the same package (file) then example values are working well, ex: type Test struct { TestField string `...
Manish Garotki's user avatar
-1 votes
1 answer
3k views

I want to get all the post form data and get the values as string, however using PostParams I am able to get all the post data, but the values are as array key: [value], how can I get all the form ...
Charas's user avatar
  • 1,837
1 vote
1 answer
504 views

i have package config.go in this my code package config import ( "fmt" logger "github.com/sirupsen/logrus" "gorm.io/driver/postgres" "gorm.io/gorm&...
dev gomar's user avatar
1 vote
1 answer
6k views

i am new in golang, just try some API in Echo Framework and got some error. My Models : package models import ( "net/http" "quotes/db" ) type Quote struct { Id ...
judith herlambang's user avatar
1 vote
0 answers
254 views

How I can assign result from rendering template to send this value as json, for ajax call my example: func Load(c echo.Context) error { params := map[string]any{ "btn_style": &...
Unknown's user avatar
  • 393
2 votes
2 answers
582 views

I am using https://github.com/labstack/echo in one of the projects. I am using c.QueryParam to parse the query parameter and its values. One of the values contains a + symbol in it and it converts ...
Arun Code's user avatar
  • 1,638
3 votes
0 answers
482 views

I'm using groups in Echo to pack some routes with a common prefix but when I get the list of routes, it returns routes for all HTTP methods. main.go e := echo.New() adminGroup := e.Group("/admin&...
behnam mohamadzadeh's user avatar
2 votes
0 answers
376 views

I'm currently trying to use a golang and echo app as both a web server and a reverse proxy and running into some issues. The main goal of this app is to allow a client to download files of various ...
Colin Campbell's user avatar
0 votes
1 answer
149 views

i am trying to change the delimiter for go in an html template. Unfortunately, it does not work in the render function, nor in the main function. See https://pkg.go.dev/text/template#Template.Delims ...
Sienael's user avatar
  • 277
2 votes
1 answer
2k views

My goal is to load an object from the database as a json object into a vue application that is rendered in a golang template. The data should be loaded directly into the web page. Does anyone have an ...
Sienael's user avatar
  • 277
5 votes
1 answer
7k views

Main Purpose: I want to simply count the execution time for any API / route, and add it into the Response Header with key: ExecutionTime. I am very open to another alternative, since my method may ...
Jacky Supit's user avatar
1 vote
1 answer
658 views

I got a user interface, user model and user id structures type UserId struct { Id int64 `param:"id" json:"id"` } type User struct { Email string `json:"email&...
Faulheit's user avatar
  • 146
0 votes
1 answer
609 views

I am trying to embed and serve my frontend (nextjs with static export) with echo. I am currently using: //go:embed all:frontend/out var FrontendFS embed.FS func BuildFrontendFS() http.FileSystem { ...
Cemre Mengü's user avatar
  • 18.9k
2 votes
0 answers
495 views

I have the following case. how can i address from handlev1 to handle2, using middleware? that depends on IsActiveBypass Or what do you suggest? func Handlev1(sw echoswagger.ApiRoot, itemUseCase ...
Goku's user avatar
  • 21
2 votes
1 answer
2k views

I am building a front end website with Golang Echo Labstack framework, and I want to call some custom functions in my template view. How do I do this with Echo? For example, I am able to do this with ...
Charas's user avatar
  • 1,837
3 votes
1 answer
4k views

Golang - Binding Headers in echo api I'm trying to bind headers to struct. So far I did the same as in documentation here but it looks like doesn't work at all. I checked in debugger incoming request ...
mikolaj semeniuk's user avatar
2 votes
2 answers
2k views

Building an app with echo and basically created some routes. The GET ones are working fine, but the post one is give me the error: Do not really understand where the error lies here. {...."method&...
LogiBaer's user avatar
0 votes
1 answer
308 views

func (api *API) sendResponse(c echo.Context, ...) error { ... if ok { if evt.Error != nil { return c.JSONBlob(statuscodes.HttpStatusDiagnosticsCheckError, resBytes) ...
xxrapunzelxx's user avatar
0 votes
2 answers
674 views

Could anyone advise how to overcome this problem please ? func GetUserController(c echo.Context) error { id := c.Param("id") finduser := users[id] return c.JSON(http.StatusOK,...
wupssie's user avatar
  • 39
1 vote
1 answer
2k views

I have some tests that inject headers into Echo like this: func test() { request := httptest.NewRequest(http.MethodGet, "/", http.NoBody) recorder := httptest.NewRecorder() ...
Woody1193's user avatar
  • 8,202
0 votes
2 answers
436 views

I'm trying to complete an echo server using golang. server like this: // use tcp to echo time func main() { // listen tcp localhost:8000 listener, err := net.Listen("tcp", "...
Carter Wang's user avatar