Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 07ea97219d
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (19 sloc) 0.6 kb
<snippet>
<content><![CDATA[
&Form{
FormID: "${1:unique-on-page}",
SubmitButtonText: "Save",
SubmitButtonConfirm: "Are you sure you want to ... ?",
GetModel: func(form *Form, ctx *Context) (model interface{}, err error) {
return ${2:&MyModel{Field: "initial value"}}, nil
},
OnSubmit: func(form *Form, formModel interface{}, ctx *Context) (string, URL, error) {
return "", nil, formModel.(*${3:MyModel}).Save()
},
Redirect: StringURL("."),
}
]]></content>
<tabTrigger>Form</tabTrigger>
<scope>source.go</scope>
<description>go-start view.Form</description>
</snippet>
Jump to Line
Something went wrong with that request. Please try again.