23 lines
365 B
Go
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"),
|
|
}
|
|
}
|