Skip to content

How do I connect a function from another directory? #2248

Answered by lolo02afon
lolo02afon asked this question in Q&A
Discussion options

You must be logged in to vote

In the views package you import the "github.com/labstack/echo/v4" package.

In main you use e.GET from github.com/labstack/echo/v4, and in the views package you import "github.com/labstack/echo"

These are different packages for go, so the echo.Context type in the FCountPrivate definition is different from the Context type used in the HandlerFunc type from the github.com/labstack/echo/v4 package.

Response from: https://stackoverflow.com/questions/73427353/how-do-i-connect-a-function-from-another-directory-to-go-echo

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lolo02afon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant