s1llyw0rdz/web/handler/form/login.go

19 lines
259 B
Go
Raw Normal View History

2021-11-22 09:06:23 +00:00
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"),
}
}