Repository: incubator-htrace
Updated Branches:
  refs/heads/master 85e3d3e93 -> 08d54c9e0


HTRACE-162: fix golang formatting (cmccabe)


Project: http://git-wip-us.apache.org/repos/asf/incubator-htrace/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-htrace/commit/08d54c9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-htrace/tree/08d54c9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-htrace/diff/08d54c9e

Branch: refs/heads/master
Commit: 08d54c9e0992043e2354f3bf307b15af34fcada5
Parents: 85e3d3e
Author: Colin P. Mccabe <[email protected]>
Authored: Thu May 7 16:04:46 2015 -0700
Committer: Colin P. Mccabe <[email protected]>
Committed: Thu May 7 16:04:46 2015 -0700

----------------------------------------------------------------------
 .../src/go/src/org/apache/htrace/htraced/datastore.go        | 6 +++---
 .../src/go/src/org/apache/htrace/htraced/datastore_test.go   | 8 ++++----
 htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go  | 2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/08d54c9e/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go 
b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
index b9dc484..0742555 100644
--- a/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore.go
@@ -741,7 +741,7 @@ func (pred *predicateData) createSource(store *dataStore, 
prev *common.Span) (*s
                // with the same secondary index field are ordered by span ID.  
So we
                // create a 17-byte key incorporating the span ID from 'prev.'
                var startId common.SpanId
-               switch (pred.Op) {
+               switch pred.Op {
                case common.EQUALS:
                        if pred.Field == common.SPAN_ID {
                                // This is an annoying corner case.  There can 
only be one
@@ -750,7 +750,7 @@ func (pred *predicateData) createSource(store *dataStore, 
prev *common.Span) (*s
                                // But for some reason someone is asking for 
another result.
                                // We modify the query to search for the 
illegal 0 span ID,
                                // which will never be present.
-                               lg.Debugf("Attempted to use a continuation 
token with an EQUALS " +
+                               lg.Debugf("Attempted to use a continuation 
token with an EQUALS "+
                                        "SPAN_ID query. %s.  Setting search id 
= 0",
                                        pred.Predicate.String())
                                startId = 0
@@ -788,7 +788,7 @@ func (pred *predicateData) createSource(store *dataStore, 
prev *common.Span) (*s
                        searchKey = makeSecondaryKey(src.keyPrefix, 
pred.uintKey, uint64(startId))
                }
                if lg.TraceEnabled() {
-                       lg.Tracef("Handling continuation token %s for %s.  
startId=%d, " +
+                       lg.Tracef("Handling continuation token %s for %s.  
startId=%d, "+
                                "pred.uintKey=%d\n", prev, 
pred.Predicate.String(), startId,
                                pred.uintKey)
                }

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/08d54c9e/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
----------------------------------------------------------------------
diff --git 
a/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go 
b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
index 8a14f30..4696547 100644
--- a/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/datastore_test.go
@@ -467,7 +467,7 @@ func TestQueriesWithContinuationTokens1(t *testing.T) {
                                Val:   "120",
                        },
                },
-               Lim: 5,
+               Lim:  5,
                Prev: &SIMPLE_TEST_SPANS[0],
        }, []common.Span{SIMPLE_TEST_SPANS[1], SIMPLE_TEST_SPANS[2]})
 
@@ -480,7 +480,7 @@ func TestQueriesWithContinuationTokens1(t *testing.T) {
                                Val:   "1",
                        },
                },
-               Lim: 100,
+               Lim:  100,
                Prev: &SIMPLE_TEST_SPANS[0],
        }, []common.Span{})
 
@@ -494,7 +494,7 @@ func TestQueriesWithContinuationTokens1(t *testing.T) {
                                Val:   "2",
                        },
                },
-               Lim: 100,
+               Lim:  100,
                Prev: &SIMPLE_TEST_SPANS[1],
        }, []common.Span{SIMPLE_TEST_SPANS[0]})
 
@@ -508,7 +508,7 @@ func TestQueriesWithContinuationTokens1(t *testing.T) {
                                Val:   "0",
                        },
                },
-               Lim: 100,
+               Lim:  100,
                Prev: &SIMPLE_TEST_SPANS[1],
        }, []common.Span{SIMPLE_TEST_SPANS[2], SIMPLE_TEST_SPANS[0]})
 }

http://git-wip-us.apache.org/repos/asf/incubator-htrace/blob/08d54c9e/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
----------------------------------------------------------------------
diff --git a/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go 
b/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
index b129268..54ca780 100644
--- a/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
+++ b/htrace-htraced/src/go/src/org/apache/htrace/htraced/hrpc.go
@@ -65,7 +65,7 @@ func createErrAndWarn(lg *common.Logger, val string) error {
 }
 
 func createErrAndLog(lg *common.Logger, val string, level common.Level) error {
-       lg.Write(level, val + "\n")
+       lg.Write(level, val+"\n")
        return errors.New(val)
 }
 

Reply via email to