Skip to content

Commit

Permalink
alter NewTraceWriter to return a pointer - go vet was complaining abo…
Browse files Browse the repository at this point in the history
…ut passing traceWriter's mutex by value
  • Loading branch information
Fred McCann committed Aug 4, 2014
1 parent 6f558cc commit 8a78b62
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
3 changes: 2 additions & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ Miguel Serrano <[email protected]>
Stefan Radomski <[email protected]>
Josh Wright <[email protected]>
Jacob Rhoden <[email protected]>
Ben Frye <[email protected]>
Ben Frye <[email protected]>
Fred McCann <[email protected]>
3 changes: 1 addition & 2 deletions compressor.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"code.google.com/p/snappy-go/snappy"
)


type Compressor interface {
Name() string
Encode(data []byte) ([]byte, error)
Expand All @@ -26,4 +25,4 @@ func (s SnappyCompressor) Encode(data []byte) ([]byte, error) {

func (s SnappyCompressor) Decode(data []byte) ([]byte, error) {
return snappy.Decode(nil, data)
}
}
20 changes: 10 additions & 10 deletions policies.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) 2012 The gocql Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//This file will be the future home for more policies
package gocql

// RetryPolicy represents the retry behavour for a query.
type RetryPolicy struct {
NumRetries int //Number of times to retry a query
}
// Copyright (c) 2012 The gocql Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//This file will be the future home for more policies
package gocql

// RetryPolicy represents the retry behavour for a query.
type RetryPolicy struct {
NumRetries int //Number of times to retry a query
}
4 changes: 2 additions & 2 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,10 +501,10 @@ type traceWriter struct {
// NewTraceWriter returns a simple Tracer implementation that outputs
// the event log in a textual format.
func NewTraceWriter(session *Session, w io.Writer) Tracer {
return traceWriter{session: session, w: w}
return &traceWriter{session: session, w: w}
}

func (t traceWriter) Trace(traceId []byte) {
func (t *traceWriter) Trace(traceId []byte) {
var (
coordinator string
duration int
Expand Down
2 changes: 1 addition & 1 deletion uuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (u UUID) String() string {
const hexString = "0123456789abcdef"
r := make([]byte, 36)
for i, b := range u {
r[offsets[i]] = hexString[b>>4]
r[offsets[i]] = hexString[b>>4]
r[offsets[i]+1] = hexString[b&0xF]
}
r[8] = '-'
Expand Down

0 comments on commit 8a78b62

Please sign in to comment.