Merge pull request #120 from lokhman/issue119

Fix DefaultValidationKeys generated with wrong line for multiline check
This commit is contained in:
notzippy
2018-04-15 21:14:55 -07:00
committed by GitHub

View File

@@ -598,7 +598,7 @@ func getValidationKeys(fset *token.FileSet, funcDecl *ast.FuncDecl, imports map[
}
if typeExpr := NewTypeExpr("", key); typeExpr.Valid {
lineKeys[fset.Position(callExpr.End()).Line] = typeExpr.TypeName("")
lineKeys[fset.Position(callExpr.Pos()).Line] = typeExpr.TypeName("")
}
return true
})