refactor: compile without warnings
Some checks failed
Some checks failed
This commit is contained in:
parent
23632be7a4
commit
a2fda0d4b7
8 changed files with 47 additions and 47 deletions
|
|
@ -8,7 +8,7 @@ import net.http
|
|||
const attrs_to_ignore = ['auth']
|
||||
|
||||
// Parsing function attributes for methods and path.
|
||||
fn parse_attrs(name string, attrs []string) ?([]http.Method, string) {
|
||||
fn parse_attrs(name string, attrs []string) !([]http.Method, string) {
|
||||
if attrs.len == 0 {
|
||||
return [http.Method.get], '/$name'
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ fn parse_query_from_url(url urllib.URL) map[string]string {
|
|||
}
|
||||
|
||||
// Extract form data from an HTTP request.
|
||||
fn parse_form_from_request(request http.Request) ?(map[string]string, map[string][]http.FileData) {
|
||||
fn parse_form_from_request(request http.Request) !(map[string]string, map[string][]http.FileData) {
|
||||
mut form := map[string]string{}
|
||||
mut files := map[string][]http.FileData{}
|
||||
if request.method in methods_with_form {
|
||||
|
|
|
|||
Reference in a new issue