Skip to content

Commit

Permalink
Update goimports local prefixes (#350)
Browse files Browse the repository at this point in the history
* Update goimports local prefixes

* Run linter
  • Loading branch information
MrAlias authored Sep 26, 2023
1 parent 58cdb0f commit d433218
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ linters-settings:
# Exclude sentences prefixing a list.
- ':$'
goimports:
local-prefixes: go.opentelemetry.io
local-prefixes: go.opentelemetry.io/auto
misspell:
locale: US
ignore-words:
Expand Down
7 changes: 4 additions & 3 deletions internal/pkg/instrumentors/bpf/database/sql/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ import (
"github.com/cilium/ebpf/perf"
"golang.org/x/sys/unix"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/utils"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c
Expand Down
5 changes: 3 additions & 2 deletions internal/pkg/instrumentors/bpf/database/sql/probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (

"github.com/stretchr/testify/assert"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
)

func TestInstrumentorConvertEvent(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ import (
"github.com/cilium/ebpf/perf"
"golang.org/x/sys/unix"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/inject"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/utils"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (

"github.com/stretchr/testify/assert"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
)

func TestInstrumentorConvertEvent(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ import (
"github.com/cilium/ebpf/perf"
"golang.org/x/sys/unix"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/inject"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/utils"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ import (
"github.com/hashicorp/go-version"
"golang.org/x/sys/unix"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/inject"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/utils"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c
Expand Down
7 changes: 4 additions & 3 deletions internal/pkg/instrumentors/bpf/net/http/client/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ import (
"github.com/cilium/ebpf/perf"
"golang.org/x/sys/unix"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/inject"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c
Expand Down
7 changes: 4 additions & 3 deletions internal/pkg/instrumentors/bpf/net/http/server/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ import (
"github.com/cilium/ebpf/perf"
"golang.org/x/sys/unix"

"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/inject"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/utils"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"
)

//go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c
Expand Down
5 changes: 3 additions & 2 deletions internal/pkg/instrumentors/bpf/net/http/server/probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (

"github.com/stretchr/testify/assert"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/otel/attribute"
semconv "go.opentelemetry.io/otel/semconv/v1.7.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/context"
"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
)

func TestInstrumentorConvertEvent(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions internal/pkg/opentelemetry/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ import (
"golang.org/x/sys/unix"
"google.golang.org/grpc"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/log"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace"
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.18.0"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/auto/internal/pkg/log"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion internal/pkg/opentelemetry/id_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ package opentelemetry
import (
"context"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
"go.opentelemetry.io/otel/trace"

"go.opentelemetry.io/auto/internal/pkg/instrumentors/events"
)

type eBPFSourceIDGenerator struct{}
Expand Down

0 comments on commit d433218

Please sign in to comment.