diff --git a/binding/binding.go b/binding/binding.go index 3a2aad9..ecbce2f 100644 --- a/binding/binding.go +++ b/binding/binding.go @@ -37,7 +37,7 @@ type BindingBody interface { // StructValidator is the minimal interface which needs to be implemented in // order for it to be used as the validator engine for ensuring the correctness -// of the reqest. Gin provides a default implementation for this using +// of the request. Gin provides a default implementation for this using // https://github.com/go-playground/validator/tree/v8.18.2. type StructValidator interface { // ValidateStruct can receive any kind of type and it should never panic, even if the configuration is not right. diff --git a/binding/protobuf.go b/binding/protobuf.go index 540e9c1..f9ece92 100644 --- a/binding/protobuf.go +++ b/binding/protobuf.go @@ -29,7 +29,7 @@ func (protobufBinding) BindBody(body []byte, obj interface{}) error { if err := proto.Unmarshal(body, obj.(proto.Message)); err != nil { return err } - // Here it's same to return validate(obj), but util now we cann't add + // Here it's same to return validate(obj), but util now we can't add // `binding:""` to the struct which automatically generate by gen-proto return nil // return validate(obj) diff --git a/context.go b/context.go index c8a59bb..e5d9180 100644 --- a/context.go +++ b/context.go @@ -525,7 +525,7 @@ func (c *Context) BindQuery(obj interface{}) error { } // MustBindWith binds the passed struct pointer using the specified binding engine. -// It will abort the request with HTTP 400 if any error ocurrs. +// It will abort the request with HTTP 400 if any error occurs. // See the binding package. func (c *Context) MustBindWith(obj interface{}, b binding.Binding) (err error) { if err = c.ShouldBindWith(obj, b); err != nil { diff --git a/examples/grpc/gin/main.go b/examples/grpc/gin/main.go index edc1ca9..820e65a 100644 --- a/examples/grpc/gin/main.go +++ b/examples/grpc/gin/main.go @@ -19,7 +19,7 @@ func main() { defer conn.Close() client := pb.NewGreeterClient(conn) - // Set up a http setver. + // Set up a http server. r := gin.Default() r.GET("/rest/n/:name", func(c *gin.Context) { name := c.Param("name") diff --git a/logger.go b/logger.go index 5f98685..74dd2e6 100644 --- a/logger.go +++ b/logger.go @@ -53,7 +53,7 @@ func Logger() HandlerFunc { return LoggerWithWriter(DefaultWriter) } -// LoggerWithWriter instance a Logger middleware with the specified writter buffer. +// LoggerWithWriter instance a Logger middleware with the specified writer buffer. // Example: os.Stdout, a file opened in write mode, a socket... func LoggerWithWriter(out io.Writer, notlogged ...string) HandlerFunc { isTerm := true diff --git a/routergroup.go b/routergroup.go index 579aa7d..9cb0b98 100644 --- a/routergroup.go +++ b/routergroup.go @@ -53,8 +53,8 @@ func (group *RouterGroup) Use(middleware ...HandlerFunc) IRoutes { return group.returnObj() } -// Group creates a new router group. You should add all the routes that have common middlwares or the same path prefix. -// For example, all the routes that use a common middlware for authorization could be grouped. +// Group creates a new router group. You should add all the routes that have common middlewares or the same path prefix. +// For example, all the routes that use a common middleware for authorization could be grouped. func (group *RouterGroup) Group(relativePath string, handlers ...HandlerFunc) *RouterGroup { return &RouterGroup{ Handlers: group.combineHandlers(handlers), diff --git a/tree_test.go b/tree_test.go index a1b3bbe..92dc695 100644 --- a/tree_test.go +++ b/tree_test.go @@ -12,7 +12,7 @@ import ( "testing" ) -// Used as a workaround since we can't compare functions or their addressses +// Used as a workaround since we can't compare functions or their addresses var fakeHandlerValue string func fakeHandler(val string) HandlersChain {