Skip to content

Instantly share code, notes, and snippets.

@cwndrws
Created December 26, 2013 13:28
Show Gist options
  • Save cwndrws/8133848 to your computer and use it in GitHub Desktop.
Save cwndrws/8133848 to your computer and use it in GitHub Desktop.
Program that produces error on truncate.
package main
import (
"tux21b.org/v1/gocql"
"log"
)
var cluster *gocql.ClusterConfig
func init() {
cluster = gocql.NewCluster("cassServer")
cluster.Keyspace = "dev"
cluster.Consistency = gocql.Quorum
cluster.ProtoVersion = 1
cluster.CQLVersion = "3.0.0"
}
func main() {
session := cluster.CreateSession()
defer session.Close()
if err := session.Query(`TRUNCATE test`).Exec(); err != nil {
log.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment