Browse Source

fix a bunch of typos

Vincent Rischmann 8 years ago
parent
commit
a56be99b0e
10 changed files with 12 additions and 12 deletions
  1. 1 1
      cassandra_test.go
  2. 2 2
      cluster.go
  3. 1 1
      conn.go
  4. 1 1
      conn_test.go
  5. 1 1
      connectionpool.go
  6. 1 1
      frame.go
  7. 1 1
      internal/ccm/ccm.go
  8. 1 1
      internal/lru/lru.go
  9. 1 1
      metadata.go
  10. 2 2
      session.go

+ 1 - 1
cassandra_test.go

@@ -2155,7 +2155,7 @@ func TestManualQueryPaging(t *testing.T) {
 	var id, count, fetched int
 
 	iter := query.Iter()
-	// NOTE: this isnt very indicitive of how it should be used, the idea is that
+	// NOTE: this isnt very indicative of how it should be used, the idea is that
 	// the page state is returned to some client who will send it back to manually
 	// page through the results.
 	for {

+ 2 - 2
cluster.go

@@ -28,7 +28,7 @@ func (p PoolConfig) buildPool(session *Session) *policyConnPool {
 // behavior to fit the most common use cases. Applications that require a
 // different setup must implement their own cluster.
 type ClusterConfig struct {
-	// addresses for the initial connections. It is recomended to use the value set in
+	// addresses for the initial connections. It is recommended to use the value set in
 	// the Cassandra config for broadcast_address or listen_address, an IP address not
 	// a domain name. This is because events from Cassandra will use the configured IP
 	// address, which is used to index connected hosts. If the domain name specified
@@ -122,7 +122,7 @@ type ClusterConfig struct {
 // NewCluster generates a new config for the default cluster implementation.
 //
 // The supplied hosts are used to initially connect to the cluster then the rest of
-// the ring will be automatically discovered. It is recomended to use the value set in
+// the ring will be automatically discovered. It is recommended to use the value set in
 // the Cassandra config for broadcast_address or listen_address, an IP address not
 // a domain name. This is because events from Cassandra will use the configured IP
 // address, which is used to index connected hosts. If the domain name specified

+ 1 - 1
conn.go

@@ -731,7 +731,7 @@ func (c *Conn) prepareStatement(ctx context.Context, stmt string, tracer Tracer)
 	switch x := frame.(type) {
 	case *resultPreparedFrame:
 		flight.preparedStatment = &preparedStatment{
-			// defensivly copy as we will recycle the underlying buffer after we
+			// defensively copy as we will recycle the underlying buffer after we
 			// return.
 			id: copyBytes(x.preparedID),
 			// the type info's should _not_ have a reference to the framers read buffer,

+ 1 - 1
conn_test.go

@@ -251,7 +251,7 @@ func TestQueryRetry(t *testing.T) {
 	requests := atomic.LoadInt64(&srv.nKillReq)
 	attempts := qry.Attempts()
 	if requests != int64(attempts) {
-		t.Fatalf("expected requests %v to match query attemps %v", requests, attempts)
+		t.Fatalf("expected requests %v to match query attempts %v", requests, attempts)
 	}
 
 	// the query will only be attempted once, but is being retried

+ 1 - 1
connectionpool.go

@@ -153,7 +153,7 @@ func (p *policyConnPool) SetHosts(hosts []*HostInfo) {
 		pool := <-pools
 		createCount--
 		if pool.Size() > 0 {
-			// add pool onyl if there a connections available
+			// add pool only if there a connections available
 			p.hostConnPools[string(pool.host.Peer())] = pool
 		}
 	}

+ 1 - 1
frame.go

@@ -558,7 +558,7 @@ func (f *framer) parseErrorFrame() frame {
 		stmtId := f.readShortBytes()
 		return &RequestErrUnprepared{
 			errorFrame:  errD,
-			StatementId: copyBytes(stmtId), // defensivly copy
+			StatementId: copyBytes(stmtId), // defensively copy
 		}
 	case errReadFailure:
 		res := &RequestErrReadFailure{

+ 1 - 1
internal/ccm/ccm.go

@@ -78,7 +78,7 @@ const (
 )
 
 func Status() (map[string]Host, error) {
-	// TODO: parse into struct o maniuplate
+	// TODO: parse into struct to manipulate
 	out, err := execCmd("status", "-v")
 	if err != nil {
 		return nil, err

+ 1 - 1
internal/lru/lru.go

@@ -30,7 +30,7 @@ type Cache struct {
 	// an item is evicted. Zero means no limit.
 	MaxEntries int
 
-	// OnEvicted optionally specificies a callback function to be
+	// OnEvicted optionally specifies a callback function to be
 	// executed when an entry is purged from the cache.
 	OnEvicted func(key string, value interface{})
 

+ 1 - 1
metadata.go

@@ -90,7 +90,7 @@ func (c ColumnKind) String() string {
 	case ColumnStatic:
 		return "static"
 	default:
-		return fmt.Sprintf("unkown_column_%d", c)
+		return fmt.Sprintf("unknown_column_%d", c)
 	}
 }
 

+ 2 - 2
session.go

@@ -440,7 +440,7 @@ func (s *Session) routingKeyInfo(ctx context.Context, stmt string) (*routingKeyI
 	if cached {
 		// done accessing the cache
 		s.routingKeyInfoCache.mu.Unlock()
-		// the entry is an inflight struct similiar to that used by
+		// the entry is an inflight struct similar to that used by
 		// Conn to prepare statements
 		inflight := entry.(*inflightCachedEntry)
 
@@ -471,7 +471,7 @@ func (s *Session) routingKeyInfo(ctx context.Context, stmt string) (*routingKeyI
 	conn := s.getConn()
 	if conn == nil {
 		// TODO: better error?
-		inflight.err = errors.New("gocql: unable to fetch preapred info: no connection avilable")
+		inflight.err = errors.New("gocql: unable to fetch prepared info: no connection available")
 		return nil, inflight.err
 	}