s1llyw0rdz/web/handler/form/login.go
2021-11-22 10:06:23 +01:00

18 lines
259 B
Go

package form
import (
"net/http"
)
type LoginForm struct {
Username string
Password string
Error string
}
func NewLoginForm(r *http.Request) *LoginForm {
return &LoginForm{
Username: r.FormValue("name"),
Password: r.FormValue("password"),
}
}