18 lines
319 B
Go
18 lines
319 B
Go
package v1
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/labstack/echo/v4"
|
|
)
|
|
|
|
func (h *Handler) DemoHello(c echo.Context) error {
|
|
return c.String(http.StatusOK, "Hello, World!")
|
|
}
|
|
|
|
func (h *Handler) HelloWho(c echo.Context) error {
|
|
who := c.Param("who")
|
|
return c.String(http.StatusOK, fmt.Sprintf("Hello, %s!", who))
|
|
}
|