Skip to content

Commit

Permalink
change tab to space
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrul21 committed Jun 30, 2021
1 parent e71b760 commit d6ebbf6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sqlstruct.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ by the same alias, using the ColumnsAliased and ScanAliased functions:
var user User
var address Address
sql := `
SELECT %s, %s FROM users AS u
INNER JOIN address AS a ON a.id = u.address_id
WHERE u.username = ?
`
SELECT %s, %s FROM users AS u
INNER JOIN address AS a ON a.id = u.address_id
WHERE u.username = ?
`
sql = fmt.Sprintf(sql, sqlstruct.ColumnsAliased(*user, "u"), sqlstruct.ColumnsAliased(*address, "a"))
rows, err := db.Query(sql, "gedi")
if err != nil {
Expand Down

0 comments on commit d6ebbf6

Please sign in to comment.