Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use consistent naming and formatting #404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/selecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -940,8 +940,8 @@ fmt.Printf("\n%+v", users)

```go
type Role struct {
Id uint64 `db:"id"`
UserID uint64 `db:"user_id"`
Id uint64 `db:"id"`
UserId uint64 `db:"user_id"`
Name string `db:"name"`
}
type User struct {
Expand Down Expand Up @@ -973,7 +973,7 @@ You can alternatively manually select the columns with the appropriate aliases u

```go
type Role struct {
UserID uint64 `db:"user_id"`
UserId uint64 `db:"user_id"`
Name string `db:"name"`
}
type User struct {
Expand Down Expand Up @@ -1040,11 +1040,11 @@ if !found {

```go
type Role struct {
UserID uint64 `db:"user_id"`
UserId uint64 `db:"user_id"`
Name string `db:"name"`
}
type User struct {
ID uint64 `db:"id"`
Id uint64 `db:"id"`
FirstName string `db:"first_name"`
LastName string `db:"last_name"`
}
Expand Down Expand Up @@ -1075,11 +1075,11 @@ You can alternatively manually select the columns with the appropriate aliases u

```go
type Role struct {
UserID uint64 `db:"user_id"`
UserId uint64 `db:"user_id"`
Name string `db:"name"`
}
type User struct {
ID uint64 `db:"id"`
Id uint64 `db:"id"`
FirstName string `db:"first_name"`
LastName string `db:"last_name"`
Role Role `db:"user_role"` // tag as "user_role" table
Expand Down