@@ -14,7 +14,6 @@ import (
14
14
15
15
"code.gitea.io/gitea/modules/json"
16
16
"code.gitea.io/gitea/modules/log"
17
- "code.gitea.io/gitea/modules/util"
18
17
19
18
chi "github.com/go-chi/chi/v5"
20
19
)
@@ -109,41 +108,6 @@ func (ctx *BaseContext) Value(key interface{}) interface{} {
109
108
return ctx .Req .Context ().Value (key )
110
109
}
111
110
112
- // Form returns request form as string with default
113
- func (ctx * BaseContext ) Form (key string , defaults ... string ) string {
114
- return (* Forms )(ctx .Req ).MustString (key , defaults ... )
115
- }
116
-
117
- // FormTrim returns request form as string with default and trimmed spaces
118
- func (ctx * BaseContext ) FormTrim (key string , defaults ... string ) string {
119
- return (* Forms )(ctx .Req ).MustTrimmed (key , defaults ... )
120
- }
121
-
122
- // FormStrings returns request form as strings with default
123
- func (ctx * BaseContext ) FormStrings (key string , defaults ... []string ) []string {
124
- return (* Forms )(ctx .Req ).MustStrings (key , defaults ... )
125
- }
126
-
127
- // FormInt returns request form as int with default
128
- func (ctx * BaseContext ) FormInt (key string , defaults ... int ) int {
129
- return (* Forms )(ctx .Req ).MustInt (key , defaults ... )
130
- }
131
-
132
- // FormInt64 returns request form as int64 with default
133
- func (ctx * BaseContext ) FormInt64 (key string , defaults ... int64 ) int64 {
134
- return (* Forms )(ctx .Req ).MustInt64 (key , defaults ... )
135
- }
136
-
137
- // FormBool returns request form as bool with default
138
- func (ctx * BaseContext ) FormBool (key string , defaults ... bool ) bool {
139
- return (* Forms )(ctx .Req ).MustBool (key , defaults ... )
140
- }
141
-
142
- // FormOptionalBool returns request form as OptionalBool with default
143
- func (ctx * BaseContext ) FormOptionalBool (key string , defaults ... util.OptionalBool ) util.OptionalBool {
144
- return (* Forms )(ctx .Req ).MustOptionalBool (key , defaults ... )
145
- }
146
-
147
111
// Error returned an error to web browser
148
112
func (ctx * BaseContext ) Error (status int , contents ... string ) {
149
113
var v = http .StatusText (status )
0 commit comments