Skip to content

Commit

Permalink
go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
valyala committed Feb 5, 2020
1 parent ea4d066 commit 1758e73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ func (c *Config) String() string {
func withoutSensitiveInfo(config *Config) *Config {
const pswPlaceHolder = "XXX"
c := deepcopy.Copy(config).(*Config)
for i, _ := range c.Users {
for i := range c.Users {
c.Users[i].Password = pswPlaceHolder
}
for i, _ := range c.Clusters {
for i := range c.Clusters {
if len(c.Clusters[i].KillQueryUser.Name) > 0 {
c.Clusters[i].KillQueryUser.Password = pswPlaceHolder
}
for j, _ := range c.Clusters[i].ClusterUsers {
for j := range c.Clusters[i].ClusterUsers {
c.Clusters[i].ClusterUsers[j].Password = pswPlaceHolder
}
}
Expand Down Expand Up @@ -423,6 +423,7 @@ func (u *KillQueryUser) UnmarshalYAML(unmarshal func(interface{}) error) error {
return checkOverflow(u.XXX, "kill_query_user")
}

// HeartBeat - configuration for heartbeat.
type HeartBeat struct {
// Interval is an interval of checking
// all cluster nodes for availability
Expand Down
2 changes: 1 addition & 1 deletion scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (s *scope) String() string {
s.user.name, s.user.queryCounter.load(),
s.clusterUser.name, s.clusterUser.queryCounter.load(),
s.host.addr.Host, s.host.load(),
s.remoteAddr, s.localAddr, time.Since(s.startTime).Nanoseconds() / 1000.0 )
s.remoteAddr, s.localAddr, time.Since(s.startTime).Nanoseconds()/1000.0)
}

func (s *scope) incQueued() error {
Expand Down

0 comments on commit 1758e73

Please sign in to comment.