Skip to content

Commit

Permalink
fix: minor style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jlorgal committed Nov 13, 2017
1 parent 9b5cc8c commit 8bf15da
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://api.travis-ci.org/Telefonica/govice.svg?branch=master)](https://travis-ci.org/Telefonica/govice) [![Coverage Status](https://coveralls.io/repos/Telefonica/govice/badge.svg?branch=master&service=github)](https://coveralls.io/github/Telefonica/govice?branch=master)
[![Build Status](https://api.travis-ci.org/Telefonica/govice.svg?branch=master)](https://travis-ci.org/Telefonica/govice) [![Coverage Status](https://coveralls.io/repos/Telefonica/govice/badge.svg?branch=master&service=github)](https://coveralls.io/github/Telefonica/govice?branch=master) [![](https://godoc.org/github.com/Telefonica/govice?status.svg)](http://godoc.org/github.com/Telefonica/govice) [![](http://goreportcard.com/badge/Telefonica/govice)](http://goreportcard.com/report/Telefonica/govice)

# govice

Expand Down
2 changes: 1 addition & 1 deletion examples/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"os"
"time"

"github.com/gorilla/mux"
"github.com/Telefonica/govice"
"github.com/gorilla/mux"
)

type config struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/service/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"fmt"
"net/http"

"github.com/gorilla/mux"
"github.com/Telefonica/govice"
"github.com/gorilla/mux"
)

// User type.
Expand Down
2 changes: 1 addition & 1 deletion log.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func NewLogger() *Logger {
}
}

// SetDefaultLogLevel sets the default log level. This default can be overriden with SetLevel method.
// SetDefaultLogLevel sets the default log level. This default can be overridden with SetLevel method.
func SetDefaultLogLevel(level string) {
defaultLogLevel = levelByName(level)
}
Expand Down
5 changes: 1 addition & 4 deletions validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,7 @@ func (v *Validator) validateRequestBody(schemaName string, r *http.Request, o in
// ValidateObject to validate an object against a JSON schema.
func (v *Validator) ValidateObject(schemaName string, data interface{}) error {
documentLoader := gojsonschema.NewGoLoader(data)
if err := v.validate(schemaName, documentLoader); err != nil {
return err
}
return nil
return v.validate(schemaName, documentLoader)
}

// ValidateBytes reads a byte array, validates it against a JSON schema, and unmarshall it.
Expand Down

0 comments on commit 8bf15da

Please sign in to comment.