Skip to content

Commit 19294aa

Browse files
mx-psiMrAlias
andauthored
Add vanity imports to internal packages (#2280)
* `porto -w --include-internal .` * Bump `porto` to 0.4.0 and include internal files Co-authored-by: Tyler Yahn <[email protected]>
1 parent ef0cdeb commit 19294aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+56
-56
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ lint: misspell lint-modules | $(GOLANGCI_LINT)
145145

146146
.PHONY: vanity-import-check
147147
vanity-import-check: | $(PORTO)
148-
$(PORTO) -l .
148+
$(PORTO) --include-internal -l .
149149

150150
.PHONY: misspell
151151
misspell: | $(MISSPELL)

bridge/opencensus/internal/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internal
15+
package internal // import "go.opentelemetry.io/otel/bridge/opencensus/internal"
1616

1717
import "go.opentelemetry.io/otel"
1818

bridge/opencensus/internal/oc2otel/attributes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package oc2otel
15+
package oc2otel // import "go.opentelemetry.io/otel/bridge/opencensus/internal/oc2otel"
1616

1717
import (
1818
octrace "go.opencensus.io/trace"

bridge/opencensus/internal/oc2otel/span_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package oc2otel
15+
package oc2otel // import "go.opentelemetry.io/otel/bridge/opencensus/internal/oc2otel"
1616

1717
import (
1818
octrace "go.opencensus.io/trace"

bridge/opencensus/internal/oc2otel/tracer_start_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package oc2otel
15+
package oc2otel // import "go.opentelemetry.io/otel/bridge/opencensus/internal/oc2otel"
1616

1717
import (
1818
"fmt"

bridge/opencensus/internal/otel2oc/span_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otel2oc
15+
package otel2oc // import "go.opentelemetry.io/otel/bridge/opencensus/internal/otel2oc"
1616

1717
import (
1818
octrace "go.opencensus.io/trace"

bridge/opencensus/internal/span.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internal
15+
package internal // import "go.opentelemetry.io/otel/bridge/opencensus/internal"
1616

1717
import (
1818
"fmt"

bridge/opencensus/internal/tracer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internal
15+
package internal // import "go.opentelemetry.io/otel/bridge/opencensus/internal"
1616

1717
import (
1818
"context"

bridge/opentracing/internal/mock.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internal
15+
package internal // import "go.opentelemetry.io/otel/bridge/opentracing/internal"
1616

1717
import (
1818
"context"

exporters/otlp/otlpmetric/internal/connection/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package connection
15+
package connection // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/connection"
1616

1717
import (
1818
"context"

exporters/otlp/otlpmetric/internal/metrictransform/attribute.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package metrictransform
15+
package metrictransform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/metrictransform"
1616

1717
import (
1818
"go.opentelemetry.io/otel/attribute"

exporters/otlp/otlpmetric/internal/metrictransform/metric.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// Package transform provides translations for opentelemetry-go concepts and
1616
// structures to otlp structures.
17-
package metrictransform
17+
package metrictransform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/metrictransform"
1818

1919
import (
2020
"context"

exporters/otlp/otlpmetric/internal/metrictransform/resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package metrictransform
15+
package metrictransform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/metrictransform"
1616

1717
import (
1818
resourcepb "go.opentelemetry.io/proto/otlp/resource/v1"

exporters/otlp/otlpmetric/internal/otlpconfig/envconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpconfig
15+
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpconfig"
1616

1717
import (
1818
"crypto/tls"

exporters/otlp/otlpmetric/internal/otlpconfig/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig"
15+
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpconfig"
1616

1717
import (
1818
"crypto/tls"

exporters/otlp/otlpmetric/internal/otlpconfig/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpconfig
15+
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpconfig"
1616

1717
import (
1818
"crypto/tls"

exporters/otlp/otlpmetric/internal/otlpmetrictest/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpmetrictest
15+
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"
1616

1717
import (
1818
"context"

exporters/otlp/otlpmetric/internal/otlpmetrictest/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpmetrictest
15+
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"
1616

1717
import (
1818
collectormetricpb "go.opentelemetry.io/proto/otlp/collector/metrics/v1"

exporters/otlp/otlpmetric/internal/otlpmetrictest/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpmetrictest
15+
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"
1616

1717
import (
1818
"context"

exporters/otlp/otlpmetric/internal/otlpmetrictest/otlptest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpmetrictest
15+
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"
1616

1717
import (
1818
"context"

exporters/otlp/otlptrace/internal/connection/connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package connection
15+
package connection // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/connection"
1616

1717
import (
1818
"context"

exporters/otlp/otlptrace/internal/otlpconfig/envconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpconfig
15+
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"
1616

1717
import (
1818
"crypto/tls"

exporters/otlp/otlptrace/internal/otlpconfig/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlpconfig
15+
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"
1616

1717
import (
1818
"crypto/tls"

exporters/otlp/otlptrace/internal/otlptracetest/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlptracetest
15+
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"
1616

1717
import (
1818
"context"

exporters/otlp/otlptrace/internal/otlptracetest/collector.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlptracetest
15+
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"
1616

1717
import (
1818
"sort"

exporters/otlp/otlptrace/internal/otlptracetest/data.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlptracetest
15+
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"
1616

1717
import (
1818
"time"

exporters/otlp/otlptrace/internal/otlptracetest/otlptest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package otlptracetest
15+
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"
1616

1717
import (
1818
"context"

exporters/otlp/otlptrace/internal/retry/retry.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package retry
15+
package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry"
1616

1717
import (
1818
"context"

exporters/otlp/otlptrace/internal/tracetransform/attribute.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package tracetransform
15+
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
1616

1717
import (
1818
"go.opentelemetry.io/otel/attribute"

exporters/otlp/otlptrace/internal/tracetransform/instrumentation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package tracetransform
15+
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
1616

1717
import (
1818
commonpb "go.opentelemetry.io/proto/otlp/common/v1"

exporters/otlp/otlptrace/internal/tracetransform/resource.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package tracetransform
15+
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
1616

1717
import (
1818
resourcepb "go.opentelemetry.io/proto/otlp/resource/v1"

exporters/otlp/otlptrace/internal/tracetransform/span.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package tracetransform
15+
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"
1616

1717
import (
1818
"go.opentelemetry.io/otel/attribute"

internal/baggage/baggage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ this need this package would not need to exist and the
2121
`go.opentelemetry.io/otel/baggage` package would be the singular place where
2222
W3C baggage is handled.
2323
*/
24-
package baggage
24+
package baggage // import "go.opentelemetry.io/otel/internal/baggage"
2525

2626
// List is the collection of baggage members. The W3C allows for duplicates,
2727
// but OpenTelemetry does not, therefore, this is represented as a map.

internal/baggage/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package baggage
15+
package baggage // import "go.opentelemetry.io/otel/internal/baggage"
1616

1717
import "context"
1818

internal/global/propagator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package global
15+
package global // import "go.opentelemetry.io/otel/internal/global"
1616

1717
import (
1818
"context"

internal/global/state.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package global
15+
package global // import "go.opentelemetry.io/otel/internal/global"
1616

1717
import (
1818
"sync"

internal/global/trace.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package global
15+
package global // import "go.opentelemetry.io/otel/internal/global"
1616

1717
/*
1818
This file contains the forwarding implementation of the TracerProvider used as

internal/internaltest/alignment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internaltest
15+
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"
1616

1717
/*
1818
This file contains common utilities and objects to validate memory alignment

internal/internaltest/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internaltest
15+
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"
1616

1717
import (
1818
"os"

internal/internaltest/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internaltest
15+
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"
1616

1717
type TestError string
1818

internal/internaltest/text_map_carrier.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internaltest
15+
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"
1616

1717
import (
1818
"sync"

internal/internaltest/text_map_propagator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package internaltest
15+
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"
1616

1717
import (
1818
"context"

internal/matchers/expectation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package matchers
15+
package matchers // import "go.opentelemetry.io/otel/internal/matchers"
1616

1717
import (
1818
"fmt"

internal/matchers/expecter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package matchers
15+
package matchers // import "go.opentelemetry.io/otel/internal/matchers"
1616

1717
import (
1818
"testing"

0 commit comments

Comments
 (0)