Skip to content

Commit 419b21c

Browse files
committed
Merge pull request #106 from peterbourgon/fix-ext-pbutil
s/ext/pbutil/g
2 parents 3657dc8 + 5303437 commit 419b21c

File tree

9 files changed

+25
-60
lines changed

9 files changed

+25
-60
lines changed

Godeps/Godeps.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/all_test.go renamed to Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/pbutil/all_test.go

Lines changed: 10 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/decode.go renamed to Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/pbutil/decode.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/doc.go renamed to Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/pbutil/doc.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/ext/encode.go renamed to Godeps/_workspace/src/github.com/matttproud/golang_protobuf_extensions/pbutil/encode.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extraction/metricfamilyprocessor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020

2121
dto "github.com/prometheus/client_model/go"
2222

23-
"github.com/matttproud/golang_protobuf_extensions/ext"
23+
"github.com/matttproud/golang_protobuf_extensions/pbutil"
2424

2525
"github.com/prometheus/client_golang/model"
2626
)
@@ -40,7 +40,7 @@ func (m *metricFamilyProcessor) ProcessSingle(i io.Reader, out Ingester, o *Proc
4040
for {
4141
family.Reset()
4242

43-
if _, err := ext.ReadDelimited(i, family); err != nil {
43+
if _, err := pbutil.ReadDelimited(i, family); err != nil {
4444
if err == io.EOF {
4545
return nil
4646
}

text/bench_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"testing"
2222
dto "github.com/prometheus/client_model/go"
2323

24-
"github.com/matttproud/golang_protobuf_extensions/ext"
24+
"github.com/matttproud/golang_protobuf_extensions/pbutil"
2525
)
2626

2727
// Benchmarks to show how much penalty text format parsing actually inflicts.
@@ -101,7 +101,7 @@ func BenchmarkParseProto(b *testing.B) {
101101
in := bytes.NewReader(data)
102102
for {
103103
family.Reset()
104-
if _, err := ext.ReadDelimited(in, family); err != nil {
104+
if _, err := pbutil.ReadDelimited(in, family); err != nil {
105105
if err == io.EOF {
106106
break
107107
}
@@ -129,7 +129,7 @@ func BenchmarkParseProtoGzip(b *testing.B) {
129129
}
130130
for {
131131
family.Reset()
132-
if _, err := ext.ReadDelimited(in, family); err != nil {
132+
if _, err := pbutil.ReadDelimited(in, family); err != nil {
133133
if err == io.EOF {
134134
break
135135
}
@@ -156,7 +156,7 @@ func BenchmarkParseProtoMap(b *testing.B) {
156156
in := bytes.NewReader(data)
157157
for {
158158
family := &dto.MetricFamily{}
159-
if _, err := ext.ReadDelimited(in, family); err != nil {
159+
if _, err := pbutil.ReadDelimited(in, family); err != nil {
160160
if err == io.EOF {
161161
break
162162
}

text/proto.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"io"
1919

2020
"github.com/golang/protobuf/proto"
21-
"github.com/matttproud/golang_protobuf_extensions/ext"
21+
"github.com/matttproud/golang_protobuf_extensions/pbutil"
2222

2323
dto "github.com/prometheus/client_model/go"
2424
)
@@ -27,7 +27,7 @@ import (
2727
// protobuf format and returns the number of bytes written and any error
2828
// encountered.
2929
func WriteProtoDelimited(w io.Writer, p *dto.MetricFamily) (int, error) {
30-
return ext.WriteDelimited(w, p)
30+
return pbutil.WriteDelimited(w, p)
3131
}
3232

3333
// WriteProtoText writes the MetricFamily to the writer in text format and

0 commit comments

Comments
 (0)