Skip to content

Commit

Permalink
fix a bunch of typos
Browse files Browse the repository at this point in the history
  • Loading branch information
vrischmann committed Mar 8, 2017
1 parent 4dd55dd commit a56be99
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion connectionpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion internal/ccm/ccm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/lru/lru.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{})

Expand Down
2 changes: 1 addition & 1 deletion metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
4 changes: 2 additions & 2 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit a56be99

Please sign in to comment.