I have the following gocql connection.
//cassandra connection
cluster := gocql.NewCluster("localhost")
cluster.Keyspace = "demo"
cluster.DefaultPort = 9042
cluster.Consistency = gocql.Quorum
session, _ = cluster.CreateSession()
defer session.Close()
I want to put this inside a golang function and return the session variable,but I don't know its datatype. I tried returning *Session but it gives me an error. Any idea how to do this.