Browse Source

Removed redundant Boolean == checks in if

Ben Frye 11 years ago
parent
commit
a3fe3be866
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cluster.go

+ 2 - 2
cluster.go

@@ -63,7 +63,7 @@ func (cfg *ClusterConfig) CreateSession() (*Session, error) {
 		s := NewSession(pool, *cfg)
 		s.SetConsistency(cfg.Consistency)
 
-		if cfg.DiscoverHosts == true {
+		if cfg.DiscoverHosts {
 			//Fill out cfg.Hosts
 			query := "SELECT peer FROM system.peers"
 			peers := s.Query(query).Iter()
@@ -76,7 +76,7 @@ func (cfg *ClusterConfig) CreateSession() (*Session, error) {
 						exists = true
 					}
 				}
-				if exists == false{
+				if !exists{
 					cfg.Hosts = append(cfg.Hosts, ip)
 				}
 			}