Skip to content

Commit

Permalink
Add vanity imports to internal packages (#2280)
Browse files Browse the repository at this point in the history
* `porto -w --include-internal .`

* Bump `porto` to 0.4.0 and include internal files

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
  • Loading branch information
mx-psi and MrAlias committed Oct 29, 2021
1 parent ef0cdeb commit 19294aa
Show file tree
Hide file tree
Showing 55 changed files with 56 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -145,7 +145,7 @@ lint: misspell lint-modules | $(GOLANGCI_LINT)

.PHONY: vanity-import-check
vanity-import-check: | $(PORTO)
$(PORTO) -l .
$(PORTO) --include-internal -l .

.PHONY: misspell
misspell: | $(MISSPELL)
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/handler.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internal
package internal // import "go.opentelemetry.io/otel/bridge/opencensus/internal"

import "go.opentelemetry.io/otel"

Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/oc2otel/attributes.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package oc2otel
package oc2otel // import "go.opentelemetry.io/otel/bridge/opencensus/internal/oc2otel"

import (
octrace "go.opencensus.io/trace"
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/oc2otel/span_context.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package oc2otel
package oc2otel // import "go.opentelemetry.io/otel/bridge/opencensus/internal/oc2otel"

import (
octrace "go.opencensus.io/trace"
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/oc2otel/tracer_start_options.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package oc2otel
package oc2otel // import "go.opentelemetry.io/otel/bridge/opencensus/internal/oc2otel"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/otel2oc/span_context.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otel2oc
package otel2oc // import "go.opentelemetry.io/otel/bridge/opencensus/internal/otel2oc"

import (
octrace "go.opencensus.io/trace"
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/span.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internal
package internal // import "go.opentelemetry.io/otel/bridge/opencensus/internal"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion bridge/opencensus/internal/tracer.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internal
package internal // import "go.opentelemetry.io/otel/bridge/opencensus/internal"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion bridge/opentracing/internal/mock.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internal
package internal // import "go.opentelemetry.io/otel/bridge/opentracing/internal"

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package connection
package connection // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/connection"

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package metrictransform
package metrictransform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/metrictransform"

import (
"go.opentelemetry.io/otel/attribute"
Expand Down
Expand Up @@ -14,7 +14,7 @@

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

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package metrictransform
package metrictransform // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/metrictransform"

import (
resourcepb "go.opentelemetry.io/proto/otlp/resource/v1"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/internal/otlpconfig/envconfig.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpconfig
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpconfig"

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/internal/otlpconfig/options.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/internal/otlpconfig"
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpconfig"

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/internal/otlpconfig/tls.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpconfig
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpconfig"

import (
"crypto/tls"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpmetrictest
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpmetrictest
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"

import (
collectormetricpb "go.opentelemetry.io/proto/otlp/collector/metrics/v1"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlpmetric/internal/otlpmetrictest/data.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpmetrictest
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpmetrictest
package otlpmetrictest // import "go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otlpmetrictest"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/connection/connection.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package connection
package connection // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/connection"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/otlpconfig/envconfig.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpconfig
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/otlpconfig/tls.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlpconfig
package otlpconfig // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig"

import (
"crypto/tls"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/otlptracetest/client.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlptracetest
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlptracetest
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"

import (
"sort"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/otlptracetest/data.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlptracetest
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"

import (
"time"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package otlptracetest
package otlptracetest // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/retry/retry.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package retry
package retry // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry"

import (
"context"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package tracetransform
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"

import (
"go.opentelemetry.io/otel/attribute"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package tracetransform
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"

import (
commonpb "go.opentelemetry.io/proto/otlp/common/v1"
Expand Down
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package tracetransform
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"

import (
resourcepb "go.opentelemetry.io/proto/otlp/resource/v1"
Expand Down
2 changes: 1 addition & 1 deletion exporters/otlp/otlptrace/internal/tracetransform/span.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package tracetransform
package tracetransform // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform"

import (
"go.opentelemetry.io/otel/attribute"
Expand Down
2 changes: 1 addition & 1 deletion internal/baggage/baggage.go
Expand Up @@ -21,7 +21,7 @@ this need this package would not need to exist and the
`go.opentelemetry.io/otel/baggage` package would be the singular place where
W3C baggage is handled.
*/
package baggage
package baggage // import "go.opentelemetry.io/otel/internal/baggage"

// List is the collection of baggage members. The W3C allows for duplicates,
// but OpenTelemetry does not, therefore, this is represented as a map.
Expand Down
2 changes: 1 addition & 1 deletion internal/baggage/context.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package baggage
package baggage // import "go.opentelemetry.io/otel/internal/baggage"

import "context"

Expand Down
2 changes: 1 addition & 1 deletion internal/global/propagator.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package global
package global // import "go.opentelemetry.io/otel/internal/global"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion internal/global/state.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package global
package global // import "go.opentelemetry.io/otel/internal/global"

import (
"sync"
Expand Down
2 changes: 1 addition & 1 deletion internal/global/trace.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package global
package global // import "go.opentelemetry.io/otel/internal/global"

/*
This file contains the forwarding implementation of the TracerProvider used as
Expand Down
2 changes: 1 addition & 1 deletion internal/internaltest/alignment.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internaltest
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"

/*
This file contains common utilities and objects to validate memory alignment
Expand Down
2 changes: 1 addition & 1 deletion internal/internaltest/env.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internaltest
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion internal/internaltest/errors.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internaltest
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"

type TestError string

Expand Down
2 changes: 1 addition & 1 deletion internal/internaltest/text_map_carrier.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internaltest
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"

import (
"sync"
Expand Down
2 changes: 1 addition & 1 deletion internal/internaltest/text_map_propagator.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package internaltest
package internaltest // import "go.opentelemetry.io/otel/internal/internaltest"

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion internal/matchers/expectation.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package matchers
package matchers // import "go.opentelemetry.io/otel/internal/matchers"

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion internal/matchers/expecter.go
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package matchers
package matchers // import "go.opentelemetry.io/otel/internal/matchers"

import (
"testing"
Expand Down

0 comments on commit 19294aa

Please sign in to comment.