Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 5, 2024
1 parent 81787c1 commit 957391e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
34 changes: 17 additions & 17 deletions cmd/generator/tests/data.avdl
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,55 @@
/** The time our edge ingested the event */
long ingestTime;


/** SomeString is a string field. */
string? SomeString = null;

/** SomeInt is an int64 field. */
long? SomeInt = null;

/** SomeFloat is a float64 field.
More comments. */
double? SomeFloat = null;

/** SomeBool is a bool field. */
boolean? SomeBool = null;

/** SomeStrings is a slice of strings. */
union {null, array<string>} SomeStrings = null;

/** SomeInts is a slice of int64. */
union {null, array<long>} SomeInts = null;

/** SomeFloats is a slice of float64. */
union {null, array<double>} SomeFloats = null;

/** SomeBools is a slice of bool. */
union {null, array<boolean>} SomeBools = null;

/** AnotherSomeString is a string field. */
string? AnotherSomeString = null;

/** AnotherSomeInt is an int64 field. */
long? AnotherSomeInt = null;

/** AnotherSomeFloat is a float64 field. */
double? AnotherSomeFloat = null;

/** AnotherSomeBool is a bool field. */
boolean? AnotherSomeBool = null;

/** AnotherSomeStrings is a slice of strings. */
union {null, array<string>} AnotherSomeStrings = null;

/** AnotherSomeInts is a slice of int64. */
union {null, array<long>} AnotherSomeInts = null;

/** AnotherSomeFloats is a slice of float64. */
union {null, array<double>} AnotherSomeFloats = null;

/** AnotherSomeBools is a slice of bool. */
union {null, array<boolean>} AnotherSomeBools = null;

}
}
8 changes: 4 additions & 4 deletions cmd/generator/tests/data_attributes_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ This is a generated file. DO NOT EDIT.
import (
"go.opentelemetry.io/otel/attribute"


"github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

func (d *Data) Attributes() []attribute.KeyValue {
var attrs []attribute.KeyValue
attrs = append(attrs, attribute.String("dataType", "ngf-product-telemetry"))


attrs = append(attrs, attribute.String("SomeString", d.SomeString))
attrs = append(attrs, attribute.Int64("SomeInt", d.SomeInt))
Expand All @@ -26,7 +26,7 @@ func (d *Data) Attributes() []attribute.KeyValue {
attrs = append(attrs, attribute.Float64Slice("SomeFloats", d.SomeFloats))
attrs = append(attrs, attribute.BoolSlice("SomeBools", d.SomeBools))
attrs = append(attrs, d.AnotherData.Attributes()...)


return attrs
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ This is a generated file. DO NOT EDIT.
import (
"go.opentelemetry.io/otel/attribute"


"github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

func (d *AnotherData) Attributes() []attribute.KeyValue {
Expand All @@ -23,7 +23,7 @@ func (d *AnotherData) Attributes() []attribute.KeyValue {
attrs = append(attrs, attribute.Int64Slice("AnotherSomeInts", d.AnotherSomeInts))
attrs = append(attrs, attribute.Float64Slice("AnotherSomeFloats", d.AnotherSomeFloats))
attrs = append(attrs, attribute.BoolSlice("AnotherSomeBools", d.AnotherSomeBools))


return attrs
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ This is a generated file. DO NOT EDIT.
import (
"go.opentelemetry.io/otel/attribute"


ngxTelemetry "github.com/nginxinc/telemetry-exporter/pkg/telemetry"

)

func (d *MoreData) Attributes() []attribute.KeyValue {
var attrs []attribute.KeyValue

attrs = append(attrs, attribute.String("StringField", d.StringField))


return attrs
}
Expand Down

0 comments on commit 957391e

Please sign in to comment.