Skip to content

Commit 56464bc

Browse files
committed
Add a description
1 parent db273b6 commit 56464bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rows.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ type Rows struct {
129129
closeErr error
130130
}
131131

132-
132+
// new Rows and add a set of driver.Value by using the struct reflect tag
133133
func newRowsFromStruct(m interface{}, tagName ...string) (*Rows, error) {
134134
val := reflect.ValueOf(m).Elem()
135135
num := val.NumField()
@@ -179,6 +179,7 @@ func NewRowsFromInterface(m interface{}, tagName string) (*Rows, error) {
179179
}
180180
}
181181

182+
// new Rows and add multiple sets of driver.Value by using the tags of the element in reflect type slice/array
182183
func newRowsFromSliceOrArray(m interface{}, tagName string) (*Rows, error) {
183184
vals := reflect.ValueOf(m)
184185
if vals.Len() == 0 {

0 commit comments

Comments
 (0)