server/pkg/modules/user/handlers/users.go

16 lines
270 B
Go
Raw Normal View History

2019-11-07 15:07:41 +00:00
package users
import (
"fmt"
"github.com/valyala/fasthttp"
)
func GetUsers(ctx *fasthttp.RequestCtx) {
fmt.Fprintf(ctx, "hello, %s!\n", ctx.UserValue("name"))
}
func PostUsers(ctx *fasthttp.RequestCtx) {
fmt.Fprintf(ctx, "hello, %s!\n", ctx.UserValue("name"))
}