I have the following code and am struggling to get rows to display:
func handleViews(w http.ResponseWriter, r *http.Request) {
var name string
query := "select * from view"
iterable := Session.Query(query).Iter()
for iterable.Scan(&name) {
fmt.Println("name>>", name)
}
fmt.Println("views called!")
}
I am able to see the "views called" logged with no panic. I even tried to intentionally pass a bogus query string like select * foo bar
and seeing identical results.
I'm trying to follow the tutorial here with the only variation being that I'm not creating a separate Cassandra module but using Session
as a global variable being used in one file.