s1llyw0rdz/web/handler/form/status.go
2021-11-30 21:50:10 +01:00

23 lines
365 B
Go

package form
import (
"net/http"
"strconv"
)
type StatusForm struct {
Id int64
Content string
Face string
Error string
}
func NewStatusForm(r *http.Request) *StatusForm {
var id int64
id, _ = strconv.ParseInt(r.FormValue("id"), 10, 64)
return &StatusForm{
Id: id,
Content: r.FormValue("content"),
Face: r.FormValue("face"),
}
}