Enable gofmt code simplification (#4887)
This commit is contained in:
committed by
Daniel Nelson
parent
4a311830c6
commit
ee056278f5
@@ -382,7 +382,7 @@ func TestNewBinaryAnnotations(t *testing.T) {
|
||||
name: "myservice",
|
||||
},
|
||||
want: []trace.BinaryAnnotation{
|
||||
trace.BinaryAnnotation{
|
||||
{
|
||||
Host: "myhost",
|
||||
ServiceName: "myservice",
|
||||
Key: "mykey",
|
||||
@@ -424,7 +424,7 @@ func TestNewAnnotations(t *testing.T) {
|
||||
name: "myservice",
|
||||
},
|
||||
want: []trace.Annotation{
|
||||
trace.Annotation{
|
||||
{
|
||||
Host: "myhost",
|
||||
ServiceName: "myservice",
|
||||
Timestamp: time.Unix(0, 0).UTC(),
|
||||
|
||||
@@ -113,7 +113,7 @@ func TestUnmarshalThrift(t *testing.T) {
|
||||
Duration: addr(53106),
|
||||
Annotations: []*zipkincore.Annotation{},
|
||||
BinaryAnnotations: []*zipkincore.BinaryAnnotation{
|
||||
&zipkincore.BinaryAnnotation{
|
||||
{
|
||||
Key: "lc",
|
||||
AnnotationType: zipkincore.AnnotationType_STRING,
|
||||
Value: []byte("trivial"),
|
||||
@@ -133,7 +133,7 @@ func TestUnmarshalThrift(t *testing.T) {
|
||||
Duration: addr(50410),
|
||||
Annotations: []*zipkincore.Annotation{},
|
||||
BinaryAnnotations: []*zipkincore.BinaryAnnotation{
|
||||
&zipkincore.BinaryAnnotation{
|
||||
{
|
||||
Key: "lc",
|
||||
AnnotationType: zipkincore.AnnotationType_STRING,
|
||||
Value: []byte("trivial"),
|
||||
@@ -151,7 +151,7 @@ func TestUnmarshalThrift(t *testing.T) {
|
||||
Timestamp: addr(1498688360851318),
|
||||
Duration: addr(103680),
|
||||
Annotations: []*zipkincore.Annotation{
|
||||
&zipkincore.Annotation{
|
||||
{
|
||||
Timestamp: 1498688360851325,
|
||||
Value: "Starting child #0",
|
||||
Host: &zipkincore.Endpoint{
|
||||
@@ -159,7 +159,7 @@ func TestUnmarshalThrift(t *testing.T) {
|
||||
ServiceName: "trivial",
|
||||
},
|
||||
},
|
||||
&zipkincore.Annotation{
|
||||
{
|
||||
Timestamp: 1498688360904545,
|
||||
Value: "Starting child #1",
|
||||
Host: &zipkincore.Endpoint{
|
||||
@@ -167,7 +167,7 @@ func TestUnmarshalThrift(t *testing.T) {
|
||||
ServiceName: "trivial",
|
||||
},
|
||||
},
|
||||
&zipkincore.Annotation{
|
||||
{
|
||||
Timestamp: 1498688360954992,
|
||||
Value: "A Log",
|
||||
Host: &zipkincore.Endpoint{
|
||||
@@ -177,7 +177,7 @@ func TestUnmarshalThrift(t *testing.T) {
|
||||
},
|
||||
},
|
||||
BinaryAnnotations: []*zipkincore.BinaryAnnotation{
|
||||
&zipkincore.BinaryAnnotation{
|
||||
{
|
||||
Key: "lc",
|
||||
AnnotationType: zipkincore.AnnotationType_STRING,
|
||||
Value: []byte("trivial"),
|
||||
|
||||
@@ -108,7 +108,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
},
|
||||
want: []testutil.Metric{
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "8090652509916334619",
|
||||
@@ -122,7 +122,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851331000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "8090652509916334619",
|
||||
@@ -139,7 +139,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851331000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "103618986556047333",
|
||||
@@ -153,7 +153,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360904552000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "103618986556047333",
|
||||
@@ -170,7 +170,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360904552000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "22964302721410078",
|
||||
@@ -184,7 +184,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"service_name": "trivial",
|
||||
@@ -200,7 +200,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"service_name": "trivial",
|
||||
@@ -216,7 +216,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"parent_id": "22964302721410078",
|
||||
@@ -232,7 +232,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"trace_id": "2505404965370368069",
|
||||
@@ -283,7 +283,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
},
|
||||
want: []testutil.Metric{
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "6802735349851856000",
|
||||
@@ -297,7 +297,7 @@ func TestLineProtocolConverter_Record(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(1, 0).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "cs",
|
||||
|
||||
@@ -27,7 +27,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
datafile: "testdata/threespans.dat",
|
||||
contentType: "application/x-thrift",
|
||||
want: []testutil.Metric{
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "7047c59776af8a1b",
|
||||
@@ -41,7 +41,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851331000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "7047c59776af8a1b",
|
||||
@@ -58,7 +58,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851331000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "17020eb55a8bfe5",
|
||||
@@ -72,7 +72,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360904552000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "17020eb55a8bfe5",
|
||||
@@ -89,7 +89,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360904552000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "5195e96239641e",
|
||||
@@ -103,7 +103,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"service_name": "trivial",
|
||||
@@ -119,7 +119,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"service_name": "trivial",
|
||||
@@ -135,7 +135,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"parent_id": "5195e96239641e",
|
||||
@@ -151,7 +151,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1498688360851318000).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"trace_id": "22c4fc8ab3669045",
|
||||
@@ -176,7 +176,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
datafile: "testdata/distributed_trace_sample.dat",
|
||||
contentType: "application/x-thrift",
|
||||
want: []testutil.Metric{
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"id": "5e682bc21ce99c80",
|
||||
@@ -190,7 +190,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1433330263415871*int64(time.Microsecond)).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "cs",
|
||||
@@ -206,7 +206,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1433330263415871*int64(time.Microsecond)).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "cr",
|
||||
@@ -486,7 +486,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1503031538778000*int64(time.Microsecond)).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "ss",
|
||||
@@ -502,7 +502,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1503031538778000*int64(time.Microsecond)).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "Demo2Application",
|
||||
@@ -519,7 +519,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1503031538778000*int64(time.Microsecond)).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "hi",
|
||||
@@ -536,7 +536,7 @@ func TestZipkinPlugin(t *testing.T) {
|
||||
},
|
||||
Time: time.Unix(0, 1503031538778000*int64(time.Microsecond)).UTC(),
|
||||
},
|
||||
testutil.Metric{
|
||||
{
|
||||
Measurement: "zipkin",
|
||||
Tags: map[string]string{
|
||||
"annotation": "192.168.0.8:test:8010",
|
||||
|
||||
Reference in New Issue
Block a user