Skip to content

Commit

Permalink
Merge pull request #1137 from sotanodroid/style_update
Browse files Browse the repository at this point in the history
🎨 Style: adjusted lines according go-lint
  • Loading branch information
Fenny authored Jan 31, 2021
2 parents c4372a4 + c62e5f7 commit cf23dcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/schema/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
if v.Type().Kind() == reflect.Struct {
for i := 0; i < v.NumField(); i++ {
field := v.Field(i)
if field.Type().Kind() == reflect.Ptr && field.IsNil() && v.Type().Field(i).Anonymous == true {
if field.Type().Kind() == reflect.Ptr && field.IsNil() && v.Type().Field(i).Anonymous {
field.Set(reflect.New(field.Type().Elem()))
}
}
Expand Down
2 changes: 1 addition & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ func (app *App) addRoute(method string, route *Route) {

// buildTree build the prefix tree from the previously registered routes
func (app *App) buildTree() *App {
if app.routesRefreshed == false {
if !app.routesRefreshed {
return app
}
// loop all the methods and stacks and create the prefix tree
Expand Down
4 changes: 2 additions & 2 deletions utils/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func AssertEqual(t testing.TB, expected, actual interface{}, description ...stri
var bType = "<nil>"

if expected != nil {
aType = fmt.Sprintf("%s", reflect.TypeOf(expected))
aType = reflect.TypeOf(expected).String()
}
if actual != nil {
bType = fmt.Sprintf("%s", reflect.TypeOf(actual))
bType = reflect.TypeOf(actual).String()
}

testName := "AssertEqual"
Expand Down

0 comments on commit cf23dcc

Please sign in to comment.