by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
kaplan
@kaplanf

Hi,
I am new to Go and starting to learn more about it, so I wanted to try echo, but I can not get past the first item on the tutorial, which is running server.go

I am using Go 1.14, created a server.go file in my GOPATH/src, run the command:

go mod init

which creates a go.mod file with this

require (
    github.com/labstack/echo/v4 v4.1.16
    golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f // indirect
)

But after that when I run the command

go build

I got this error in terminal

../../pkg/mod/github.com/labstack/gommon@v0.3.0/color/color.go:9:2: 
module github.com/mattn/go-colorable@latest found (v0.1.6),
 but does not contain package github.com/mattn/go-colorable

As far as I can see the recommended way to install is using go modules, but I could not pass this error, I'd appreciate any help, hope my question is not invalid

Eric O. Jonathan
@eric-ojonathan-dipro
Hi, got a question. I have a route with the same path, one is GET and the other POST. somehow, when I got POST, what I get is GET.
when I do a POST, what I get is GET.
kaplan
@kaplanf

Hi,
I am new to Go and starting to learn more about it, so I wanted to try echo, but I can not get past the first item on the tutorial, which is running server.go

I am using Go 1.14, created a server.go file in my GOPATH/src, run the command:

go mod init

which creates a go.mod file with this

require (
    github.com/labstack/echo/v4 v4.1.16
    golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f // indirect
)

But after that when I run the command

go build

I got this error in terminal

../../pkg/mod/github.com/labstack/gommon@v0.3.0/color/color.go:9:2: 
module github.com/mattn/go-colorable@latest found (v0.1.6),
 but does not contain package github.com/mattn/go-colorable

As far as I can see the recommended way to install is using go modules, but I could not pass this error, I'd appreciate any help, hope my question is not invalid

This was an error on my side and my environment, fixed now

Jose Peleteiro
@peleteiro
I need help. I can't figure how to make a router with "file extension". Like: /users/:id.json or even /users/:id.:ext - is this possible using echo? If so, how? I appreciate any help.
Wei He
@Wing924

Hi! I got a problem when I write a test.
My code:

func TestBindParam(t *testing.T) {
    e := echo.New()
    req := httptest.NewRequest(echo.GET, "/", nil)
    rec := httptest.NewRecorder()
    c := e.NewContext(req, rec)
    c.SetPath("/users/:id/:name")
    c.SetParamNames("id", "name")
    c.SetParamValues("1", "Jon Snow") // <- throw index out of range error
}

result:

panic: runtime error: index out of range [0] with length 0 [recovered]
    panic: runtime error: index out of range [0] with length 0

What's wrong?
I just copied from https://github.com/labstack/echo/blob/v4.1.16/bind_test.go#L333-L340

Wei He
@Wing924
Ah, I fixed it by upgrading echo from v4.1.15 to v4.1.16
Kostiantyn Skrypnyk
@ShadowScorpion
Good day, guys, quick question
anyone have some example with Casbin on Echo?
if you have please share links, thanks
Izharruden
@izharruden_twitter
hi need help on this
im getting this error
setsockopt: invalid argument
"level":"FATAL","prefix":"echo"
when e.Logger.Fatal(e.Start(":3000"))
that make my bin/main close
Lorant Kovacs
@ImAHungover
Hu,
q4345041
@q4345041
hi guys
sujayramesh
@sujayramesh
Hello Community, I would like to understand how to deploy a web archive file using echo webserver?
Roland Lammel
@lammel
@sujayramesh Guess your on the wrong boat. Web archive is a Java servlet technology. Go with Apache Tomcat (or similar) for that.
JGer
@gitzhang
hi
Does echo support brotli compression?
Lorant Kovacs
@ImAHungover
Hi, I am new in echo framework , and I need some point how can I create tcp transparent proxy middleware . can somebody give me some guidece? Thanks!
sujayramesh
@sujayramesh
@lammel Appretiate your suggestion. However, the front end is packed using gradle and built as a .war file. I'd have to find a way to deploy the .war file before web server comes up.
akhromv3
@akhromv3
any help me..
how to make a structure struct, if I consume an API like this,
[    
       {
        "attributes": {
        "OBJECTID": 59,
        "Country_Region": "ID",
        "Last_Update": 1584097775000,
        "Lat": 30.5928,
        "Long_": 114.3055,
        "Confirmed": 81346,
        "Deaths": 3265,
        "Recovered": 72355,
        "Active": 5726
        }
    }
]
thankyou🙏🙏
Damien Gallagher
@damogallagher
Hi. For the JWT middleware - https://echo.labstack.com/middleware/jwt. Is it possible to set a jwt token value for expiry date that will be auto checked as part of this middleware?
Bùi Văn Hoàng
@hoangbuix
hey everyone , how to fix error vision in echo , thanks
1.PNG
Fulvio Carvalhido
@inluxc
Hi there im havings issues when i use the proxy balancing middleware, it works when I use HTTP but when I use it in production that's uses HTTPS I get and HTTP ERROR 463
And in the logs i get a access loop to the endpoint
Fulvio Carvalhido
@inluxc
How can i debug reverse proxy middleware, I'm getting an 503 but I don't get feedback why
Fulvio Carvalhido
@inluxc
Anyone alive???
Altiano Gerung
@Altiano
Hey friends,
Can Echo bind file to a struct?!
json data is ok, but can't get to work with a file
lianjiexue
@lianjiexue
hi
zgcbj
@zgcbj
Hi
How do I make my echo work with the "colon" syntax,like 'http://www.test.com/tag:sample'?
jan Pontaoski
@pontaoski
hello o/
trying to figure out some weird behaviour in echo:
so I have a c echo.Context
i have a var data interface{}
whose value is a v1.CreateGuildData (contents irrelevant for now, only the type is)
I do c.Bind(&data)
but that ends up changing data to be a map[string]interface{}
is this expected behaviour that it changes the type of an interface{} value?
GTM
@groupto_me_twitter
Hello, please let me know what I'm doing wrong.
I'm following the official installation of echo.
Running: go get github.com/labstack/echo/v4
I get: package github.com/labstack/echo/v4: cannot find package "github.com/labstack/echo/v4" in any of:
/usr/local/go/src/github.com/labstack/echo/v4 (from $GOROOT)
/Users/eugene/git/go/test/src/github.com/labstack/echo/v4 (from $GOPATH)
I have latest GO installed.
Using echo without v4 I can run the server until I start using middleware where it has import "github.com/labstack/echo/v4"
I tried to change GOPATH to my project path and global (${HOME}/go)
Thanks
mohdaqib57
@mohdaqib57
Hi guys, how do I implement CSR token on front-end part
I dont understand the docs
GTM
@groupto_me_twitter

Hello, please let me know what I'm doing wrong.
I'm following the official installation of echo.
Running: go get github.com/labstack/echo/v4
I get: package github.com/labstack/echo/v4: cannot find package "github.com/labstack/echo/v4" in any of:
/usr/local/go/src/github.com/labstack/echo/v4 (from $GOROOT)
/Users/eugene/git/go/test/src/github.com/labstack/echo/v4 (from $GOPATH)
I have latest GO installed.
Using echo without v4 I can run the server until I start using middleware where it has import "github.com/labstack/echo/v4"
I tried to change GOPATH to my project path and global (${HOME}/go)
Thanks

Some mess in VS code terminal. Using main terminal works fine. Helpful: https://golang.org/doc/code.html

Marwan Rabbâa
@waghanza
Hi,
I have compared the req/s of fasthttp and echo in https://github.com/the-benchmarker/web-frameworks/tree/cloudify#results
How could echo be more performant that fasthttp
?
Asad Awadia
@asad-awadia
check ur set up again
I dont buy a ruby service being so high up