Skip to content

Commit ebd3252

Browse files
committed
update docs
1 parent f6aeaac commit ebd3252

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ type ATable struct {
136136
Field2 int `db:"field2"` // Use "db" in field tag to set column name used in SQL.
137137
Field3 int64 `db:"field3" fieldtag:"foo,bar"` // Set fieldtag to a field. We can use methods like `Struct#SelectForTag` to use it.
138138
Field4 int64 `db:"field4" fieldtag:"foo"` // If we use `s.SelectForTag(table, "foo")`, columnes of SELECT are field3 and field4.
139-
Field5As string `db:"field5" fieldas:"FIELD5"` // Use "fieldas" in field tag to set AS name used in SELECT.
139+
Field5 string `db:"field5" fieldas:"f5_alias"` // Use "fieldas" in field tag to set a column alias (AS) used in SELECT.
140140
Ignored int32 `db:"-"` // If we set field name as "-", Struct will ignore it.
141141
unexported int // Unexported field is not visible to Struct.
142142
Quoted string `db:"quoted" fieldopt:"withquote"` // Add quote to the field using back quote or double quote. See `Flavor#Quote`.

struct.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var (
2323
// As db column can contain "," in theory, field options should be provided in a separated tag.
2424
FieldOpt = "fieldopt"
2525

26-
// FieldAs is the AS name for a struct field.
26+
// FieldAs is the column alias (AS) for a struct field.
2727
FieldAs = "fieldas"
2828
)
2929

0 commit comments

Comments
 (0)