We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4da02dc commit 2397470Copy full SHA for 2397470
examples/queryrow/main.go
@@ -40,7 +40,7 @@ func main() {
40
// defer cancel()
41
ctx := context.Background()
42
var res float64
43
- err1 := db.QueryRowContext(ctx, `select max(carat) from default.diamonds`).Scan(res)
+ err1 := db.QueryRowContext(ctx, `select max(carat) from default.diamonds`).Scan(&res)
44
45
if err1 != nil {
46
if err1 == sql.ErrNoRows {
examples/queryrows/main.go
@@ -83,7 +83,7 @@ func main() {
83
rows.Close()
84
return
85
}
86
- // fmt.Printf("%v, %v\n", res1, res2)
+ fmt.Printf("%v, %v\n", res1, res2)
87
88
89
0 commit comments