@@ -201,7 +201,7 @@ func TestNegotiateOpenMetrics(t *testing.T) {
201
201
202
202
func TestEncode (t * testing.T ) {
203
203
var buff bytes.Buffer
204
- delimEncoder := NewEncoder (& buff , FmtProtoDelim )
204
+ delimEncoder := NewEncoder (& buff , fmtProtoDelim )
205
205
metric := & dto.MetricFamily {
206
206
Name : proto .String ("foo_metric" ),
207
207
Type : dto .MetricType_UNTYPED .Enum (),
@@ -226,7 +226,7 @@ func TestEncode(t *testing.T) {
226
226
227
227
buff .Reset ()
228
228
229
- compactEncoder := NewEncoder (& buff , FmtProtoCompact )
229
+ compactEncoder := NewEncoder (& buff , fmtProtoCompact )
230
230
err = compactEncoder .Encode (metric )
231
231
if err != nil {
232
232
t .Errorf ("unexpected error during encode: %s" , err .Error ())
@@ -239,7 +239,7 @@ func TestEncode(t *testing.T) {
239
239
240
240
buff .Reset ()
241
241
242
- protoTextEncoder := NewEncoder (& buff , FmtProtoText )
242
+ protoTextEncoder := NewEncoder (& buff , fmtProtoText )
243
243
err = protoTextEncoder .Encode (metric )
244
244
if err != nil {
245
245
t .Errorf ("unexpected error during encode: %s" , err .Error ())
@@ -252,7 +252,7 @@ func TestEncode(t *testing.T) {
252
252
253
253
buff .Reset ()
254
254
255
- textEncoder := NewEncoder (& buff , FmtText )
255
+ textEncoder := NewEncoder (& buff , fmtText )
256
256
err = textEncoder .Encode (metric )
257
257
if err != nil {
258
258
t .Errorf ("unexpected error during encode: %s" , err .Error ())
@@ -273,7 +273,7 @@ func TestEncode(t *testing.T) {
273
273
274
274
func TestEscapedEncode (t * testing.T ) {
275
275
var buff bytes.Buffer
276
- delimEncoder := NewEncoder (& buff , FmtProtoDelim + "; escaping=underscores" )
276
+ delimEncoder := NewEncoder (& buff , fmtProtoDelim + "; escaping=underscores" )
277
277
metric := & dto.MetricFamily {
278
278
Name : proto .String ("foo.metric" ),
279
279
Type : dto .MetricType_UNTYPED .Enum (),
@@ -309,7 +309,7 @@ func TestEscapedEncode(t *testing.T) {
309
309
310
310
buff .Reset ()
311
311
312
- compactEncoder := NewEncoder (& buff , FmtProtoCompact )
312
+ compactEncoder := NewEncoder (& buff , fmtProtoCompact )
313
313
err = compactEncoder .Encode (metric )
314
314
if err != nil {
315
315
t .Errorf ("unexpected error during encode: %s" , err .Error ())
@@ -322,7 +322,7 @@ func TestEscapedEncode(t *testing.T) {
322
322
323
323
buff .Reset ()
324
324
325
- protoTextEncoder := NewEncoder (& buff , FmtProtoText )
325
+ protoTextEncoder := NewEncoder (& buff , fmtProtoText )
326
326
err = protoTextEncoder .Encode (metric )
327
327
if err != nil {
328
328
t .Errorf ("unexpected error during encode: %s" , err .Error ())
@@ -335,7 +335,7 @@ func TestEscapedEncode(t *testing.T) {
335
335
336
336
buff .Reset ()
337
337
338
- textEncoder := NewEncoder (& buff , FmtText )
338
+ textEncoder := NewEncoder (& buff , fmtText )
339
339
err = textEncoder .Encode (metric )
340
340
if err != nil {
341
341
t .Errorf ("unexpected error during encode: %s" , err .Error ())
0 commit comments