diff --git a/config/generated_config.go b/config/generated_config.go index c84f52b28a3..68f8a3f9e07 100644 --- a/config/generated_config.go +++ b/config/generated_config.go @@ -2,11 +2,9 @@ package config -import ( - "encoding/json" - "fmt" - "reflect" -) +import "encoding/json" +import "fmt" +import "reflect" type AttributeLimits struct { // AttributeCountLimit corresponds to the JSON schema field diff --git a/instrgen/driver/testdata/expected/basic/fib.go b/instrgen/driver/testdata/expected/basic/fib.go index 7e3eb31908c..f5ea42c5251 100644 --- a/instrgen/driver/testdata/expected/basic/fib.go +++ b/instrgen/driver/testdata/expected/basic/fib.go @@ -5,13 +5,12 @@ package main import ( - __atel_context "context" "fmt" - + __atel_context "context" __atel_otel "go.opentelemetry.io/otel" ) -func foo(__atel_tracing_ctx __atel_context.Context) { +func foo(__atel_tracing_ctx __atel_context.Context,) { __atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("foo").Start(__atel_tracing_ctx, "foo") _ = __atel_child_tracing_ctx defer __atel_span.End() diff --git a/instrgen/driver/testdata/expected/basic/goroutines.go b/instrgen/driver/testdata/expected/basic/goroutines.go index 749f9c31b62..513874d215f 100644 --- a/instrgen/driver/testdata/expected/basic/goroutines.go +++ b/instrgen/driver/testdata/expected/basic/goroutines.go @@ -5,13 +5,12 @@ package main import ( - __atel_context "context" "fmt" - + __atel_context "context" __atel_otel "go.opentelemetry.io/otel" ) -func goroutines(__atel_tracing_ctx __atel_context.Context) { +func goroutines(__atel_tracing_ctx __atel_context.Context,) { __atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("goroutines").Start(__atel_tracing_ctx, "goroutines") _ = __atel_child_tracing_ctx defer __atel_span.End() diff --git a/instrgen/driver/testdata/expected/basic/main.go b/instrgen/driver/testdata/expected/basic/main.go index e9074d9076d..bd6cf7f951a 100644 --- a/instrgen/driver/testdata/expected/basic/main.go +++ b/instrgen/driver/testdata/expected/basic/main.go @@ -5,8 +5,8 @@ package main import ( - __atel_context "context" "fmt" + __atel_context "context" "go.opentelemetry.io/contrib/instrgen/rtlib" __atel_otel "go.opentelemetry.io/otel" diff --git a/instrgen/driver/testdata/expected/basic/methods.go b/instrgen/driver/testdata/expected/basic/methods.go index 130cac65ad5..081d85a2fde 100644 --- a/instrgen/driver/testdata/expected/basic/methods.go +++ b/instrgen/driver/testdata/expected/basic/methods.go @@ -6,7 +6,6 @@ package main import ( __atel_context "context" - __atel_otel "go.opentelemetry.io/otel" ) @@ -47,7 +46,7 @@ func (e element) get(__atel_tracing_ctx __atel_context.Context, a int) { defer __atel_span.End() } -func methods(__atel_tracing_ctx __atel_context.Context) { +func methods(__atel_tracing_ctx __atel_context.Context,) { __atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("methods").Start(__atel_tracing_ctx, "methods") _ = __atel_child_tracing_ctx defer __atel_span.End() diff --git a/instrgen/driver/testdata/expected/basic/package.go b/instrgen/driver/testdata/expected/basic/package.go index f118b41deb0..1e2e34024d2 100644 --- a/instrgen/driver/testdata/expected/basic/package.go +++ b/instrgen/driver/testdata/expected/basic/package.go @@ -5,9 +5,8 @@ package main import ( - __atel_context "context" "os" - + __atel_context "context" __atel_otel "go.opentelemetry.io/otel" ) @@ -15,7 +14,7 @@ func Close() error { return nil } -func pack(__atel_tracing_ctx __atel_context.Context) { +func pack(__atel_tracing_ctx __atel_context.Context,) { __atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("pack").Start(__atel_tracing_ctx, "pack") _ = __atel_child_tracing_ctx defer __atel_span.End() diff --git a/instrgen/driver/testdata/expected/interface/app/impl.go b/instrgen/driver/testdata/expected/interface/app/impl.go index f5b0c7946a1..9b7bb311626 100644 --- a/instrgen/driver/testdata/expected/interface/app/impl.go +++ b/instrgen/driver/testdata/expected/interface/app/impl.go @@ -5,16 +5,15 @@ package app import ( - __atel_context "context" "fmt" - + __atel_context "context" __atel_otel "go.opentelemetry.io/otel" ) type BasicSerializer struct { } -func (b BasicSerializer) Serialize(__atel_tracing_ctx __atel_context.Context) { +func (b BasicSerializer) Serialize(__atel_tracing_ctx __atel_context.Context,) { __atel_child_tracing_ctx, __atel_span := __atel_otel.Tracer("Serialize").Start(__atel_tracing_ctx, "Serialize") _ = __atel_child_tracing_ctx defer __atel_span.End() diff --git a/instrgen/driver/testdata/expected/interface/main.go b/instrgen/driver/testdata/expected/interface/main.go index f3a2417e0de..0d33e3e08d7 100644 --- a/instrgen/driver/testdata/expected/interface/main.go +++ b/instrgen/driver/testdata/expected/interface/main.go @@ -5,12 +5,11 @@ package main import ( - __atel_context "context" - - "go.opentelemetry.io/contrib/instrgen/rtlib" . "go.opentelemetry.io/contrib/instrgen/testdata/interface/app" - . "go.opentelemetry.io/contrib/instrgen/testdata/interface/serializer" __atel_otel "go.opentelemetry.io/otel" + __atel_context "context" + . "go.opentelemetry.io/contrib/instrgen/testdata/interface/serializer" + "go.opentelemetry.io/contrib/instrgen/rtlib" ) func main() { diff --git a/instrgen/driver/testdata/expected/interface/serializer/interface.go b/instrgen/driver/testdata/expected/interface/serializer/interface.go index 828c84e58ec..09f6c131b13 100644 --- a/instrgen/driver/testdata/expected/interface/serializer/interface.go +++ b/instrgen/driver/testdata/expected/interface/serializer/interface.go @@ -7,5 +7,5 @@ package serializer import __atel_context "context" type Serializer interface { - Serialize(__atel_tracing_ctx __atel_context.Context) + Serialize(__atel_tracing_ctx __atel_context.Context,) } diff --git a/instrgen/driver/testdata/expected/selector/main.go b/instrgen/driver/testdata/expected/selector/main.go index 0ba1d7c6ded..74d8c092fd9 100644 --- a/instrgen/driver/testdata/expected/selector/main.go +++ b/instrgen/driver/testdata/expected/selector/main.go @@ -5,10 +5,9 @@ package main import ( - __atel_context "context" - "go.opentelemetry.io/contrib/instrgen/rtlib" __atel_otel "go.opentelemetry.io/otel" + __atel_context "context" ) type Driver interface { diff --git a/instrgen/driver/testdata/interface/main.go b/instrgen/driver/testdata/interface/main.go index 61de3696f2a..88bb4607957 100644 --- a/instrgen/driver/testdata/interface/main.go +++ b/instrgen/driver/testdata/interface/main.go @@ -5,9 +5,9 @@ package main import ( - "go.opentelemetry.io/contrib/instrgen/rtlib" . "go.opentelemetry.io/contrib/instrgen/testdata/interface/app" . "go.opentelemetry.io/contrib/instrgen/testdata/interface/serializer" + "go.opentelemetry.io/contrib/instrgen/rtlib" ) func main() { diff --git a/instrumentation/google.golang.org/grpc/otelgrpc/example/api/hello-service.pb.go b/instrumentation/google.golang.org/grpc/otelgrpc/example/api/hello-service.pb.go index d44fd569c34..e6ec648f829 100644 --- a/instrumentation/google.golang.org/grpc/otelgrpc/example/api/hello-service.pb.go +++ b/instrumentation/google.golang.org/grpc/otelgrpc/example/api/hello-service.pb.go @@ -5,25 +5,20 @@ Package api is a generated protocol buffer package. It is generated from these files: - hello-service.proto It has these top-level messages: - HelloRequest HelloResponse */ package api -import ( - fmt "fmt" - - proto "github.com/golang/protobuf/proto" - - math "math" +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import ( context "golang.org/x/net/context" - grpc "google.golang.org/grpc" ) diff --git a/samplers/jaegerremote/internal/proto-gen/jaeger-idl/proto/api_v2/sampling.pb.go b/samplers/jaegerremote/internal/proto-gen/jaeger-idl/proto/api_v2/sampling.pb.go index 0d290f4f082..5e6714ce30f 100644 --- a/samplers/jaegerremote/internal/proto-gen/jaeger-idl/proto/api_v2/sampling.pb.go +++ b/samplers/jaegerremote/internal/proto-gen/jaeger-idl/proto/api_v2/sampling.pb.go @@ -6,13 +6,12 @@ package api_v2 import ( encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" _ "google.golang.org/genproto/googleapis/api/annotations" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/tools/tools.go b/tools/tools.go index b66e2b6a8e4..9e04608cf60 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -12,12 +12,11 @@ import ( _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/jcchavezs/porto/cmd/porto" _ "github.com/wadey/gocovmerge" - _ "golang.org/x/exp/cmd/gorelease" - _ "golang.org/x/tools/cmd/stringer" - _ "golang.org/x/vuln/cmd/govulncheck" - _ "go.opentelemetry.io/build-tools/crosslink" _ "go.opentelemetry.io/build-tools/dbotconf" _ "go.opentelemetry.io/build-tools/gotmpl" _ "go.opentelemetry.io/build-tools/multimod" + _ "golang.org/x/exp/cmd/gorelease" + _ "golang.org/x/tools/cmd/stringer" + _ "golang.org/x/vuln/cmd/govulncheck" )