Skip to content

Commit

Permalink
Fix validator import declare
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksraiden committed Jan 3, 2025
1 parent da1f3f7 commit b13359b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ type ControllerConfig struct {

const defaultPort = 9379

var checker *validator.Validate

type Config struct {
Addr string `yaml:"addr"`
StorageType string `yaml:"storage_type"`
Expand Down Expand Up @@ -99,7 +97,7 @@ func (c *Config) Validate() error {
func (c *Config) getAddr() string {
// env has higher priority than configuration.
// case: get addr from env
checker = validator.New()
checker := validator.New()
host := os.Getenv("KVROCKS_CONTROLLER_HTTP_HOST")
port := os.Getenv("KVROCKS_CONTROLLER_HTTP_PORT")
addr := host + ":" + port
Expand Down
2 changes: 1 addition & 1 deletion store/cluster_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (

"github.com/apache/kvrocks-controller/util"

"github.com/go-playground/validator/v10"
validator "github.com/go-playground/validator/v10"
"github.com/go-redis/redis/v8"
)

Expand Down

0 comments on commit b13359b

Please sign in to comment.