feat: modularize the code.
This commit is contained in:
parent
6f4757a1e9
commit
a59c892087
7 changed files with 293 additions and 243 deletions
17
index.go
Normal file
17
index.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/labstack/echo/v4"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type IndexData struct {
|
||||
Host string
|
||||
}
|
||||
|
||||
func Index(c echo.Context) error {
|
||||
data := IndexData{
|
||||
Host: domain,
|
||||
}
|
||||
return c.Render(http.StatusOK, "index", data)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue