Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Alok Kumar Singh <dev.alok.singh123@gmail.com>
  • Loading branch information
akstron committed Nov 9, 2024
1 parent 8e68b62 commit 96025e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/cassandra/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Schema struct {
// while connecting to the Cassandra Cluster. This is useful for connecting to clusters, like Azure Cosmos DB,
// that do not support SnappyCompression.
DisableCompression bool `mapstructure:"disable_compression"`
//Datacenter is the name for network topology
// Datacenter is the name for network topology
Datacenter string `mapstructure:"datacenter" valid:"optional"`
// TraceTTL is Time To Live (TTL) for the trace data in seconds
TraceTTL int `mapstructure:"trace_ttl" valid:"optional"`
Expand Down
5 changes: 3 additions & 2 deletions pkg/cassandra/config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package config
import (
"bytes"
"embed"
"errors"
"fmt"
"regexp"
"strconv"
Expand Down Expand Up @@ -106,7 +107,7 @@ func constructTemplateParams(cfg Schema) (TemplateParams, error) {
case `d`:
params.CompactionWindowUnit = `DAYS`
default:
return TemplateParams{}, fmt.Errorf("Invalid compaction window unit. If can be among {m|h|d}")
return TemplateParams{}, errors.New("Invalid compaction window unit. If can be among {m|h|d}")
}

return params, nil
Expand Down Expand Up @@ -160,7 +161,7 @@ func getQueriesFromBytes(queryFile []byte) ([]string, error) {
}

if len(queryString) > 0 {
return nil, fmt.Errorf(`Invalid template`)
return nil, errors.New(`Invalid template`)
}

return queries, nil
Expand Down

0 comments on commit 96025e2

Please sign in to comment.