From 9b5756696360c2e2f74c1d8b092e236fee6a739a Mon Sep 17 00:00:00 2001 From: LI Daobing Date: Wed, 11 Oct 2017 14:35:31 +0800 Subject: [PATCH] fix typo --- context/param/options.go | 2 +- context/param/parsers_test.go | 2 +- parser.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/context/param/options.go b/context/param/options.go index 58bdc3d0..3d5ba013 100644 --- a/context/param/options.go +++ b/context/param/options.go @@ -7,7 +7,7 @@ import ( // MethodParamOption defines a func which apply options on a MethodParam type MethodParamOption func(*MethodParam) -// IsRequired indicates that this param is required and can not be ommited from the http request +// IsRequired indicates that this param is required and can not be omitted from the http request var IsRequired MethodParamOption = func(p *MethodParam) { p.required = true } diff --git a/context/param/parsers_test.go b/context/param/parsers_test.go index b946ba08..7065a28e 100644 --- a/context/param/parsers_test.go +++ b/context/param/parsers_test.go @@ -75,7 +75,7 @@ func checkParser(def testDefinition, t *testing.T, methodParam ...MethodParam) { } convResult, err := safeConvert(reflect.ValueOf(result), toType) if err != nil { - t.Errorf("Convertion error for %v. from value: %v, toType: %v, error: %v", def.strValue, result, toType, err) + t.Errorf("Conversion error for %v. from value: %v, toType: %v, error: %v", def.strValue, result, toType, err) return } if !reflect.DeepEqual(convResult.Interface(), def.expectedValue) { diff --git a/parser.go b/parser.go index f787fd5c..1933c6c6 100644 --- a/parser.go +++ b/parser.go @@ -227,7 +227,7 @@ func parseComment(lines []*ast.Comment) (pc *parsedComment, err error) { } // direct copy from bee\g_docs.go -// analisys params return []string +// analysis params return []string // @Param query form string true "The email for login" // [query form string true "The email for login"] func getparams(str string) []string {