18 lines
259 B
Go
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"),
|
|
}
|
|
}
|