github.com/gocql/gocql
Package gocql implements a fast and robust Cassandra client for the Go programming language.
Wrap gocql.NewCluster function call or gocql.ClusterConfig struct literal (pointer)
All of
- One of
- Struct literal
gocql.ClusterConfig
- Pointer
- Call to
gocql.NewCluster
- Not
- Import path
github.com/
gocql/ gocql
Replace the expression using the template:
// Using the following synthetic imports:
import (
gocql "github.com/gocql/gocql"
gocqltrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/gocql/gocql"
)
func(cluster *gocql.ClusterConfig) *gocql.ClusterConfig {
obs := gocqltrace.NewObserver(cluster)
cluster.QueryObserver = obs
cluster.BatchObserver = obs
cluster.ConnectObserver = obs
return cluster
}({{ . }})
Wrap gocql.ClusterConfig struct literal (value)
All of
- Struct literal
gocql.ClusterConfig
- Value
- Not
- Import path
github.com/
gocql/ gocql
Replace the expression using the template:
// Using the following synthetic imports:
import (
gocql "github.com/gocql/gocql"
gocqltrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/gocql/gocql"
)
func(cluster gocql.ClusterConfig) gocql.ClusterConfig {
obs := gocqltrace.NewObserver(&cluster)
cluster.QueryObserver = obs
cluster.BatchObserver = obs
cluster.ConnectObserver = obs
return cluster
}({{ . }})