1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-11-24 08:22:25 +02:00

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 <MrAlias@users.noreply.github.com>
This commit is contained in:
Pablo Baeyens 2021-10-29 18:34:37 +02:00 committed by GitHub
parent ef0cdebc94
commit 19294aab4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 56 additions and 56 deletions

View File

@ -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)

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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.

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"
type TemporalMatcher byte

View File

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package metric
package metric // import "go.opentelemetry.io/otel/internal/metric"
import (
"context"

View File

@ -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/metric/global"
import (
"context"

View File

@ -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/metric/global"
import (
"sync"

View File

@ -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/internal"
import (
"math"

View File

@ -15,7 +15,7 @@
// Package tools provides helper functions used in scripts within the
// internal/tools module, as well as imports needed for a build with the
// "tools" build tag.
package tools
package tools // import "go.opentelemetry.io/otel/internal/tools"
import (
"errors"

View File

@ -7,7 +7,7 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/golangci/golangci-lint v1.42.1
github.com/itchyny/gojq v0.12.5
github.com/jcchavezs/porto v0.3.0
github.com/jcchavezs/porto v0.4.0
github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad
go.opentelemetry.io/build-tools/multimod v0.0.0-20210920164323-2ceabab23375
go.opentelemetry.io/build-tools/semconvgen v0.0.0-20210920164323-2ceabab23375

View File

@ -409,8 +409,8 @@ github.com/itchyny/timefmt-go v0.1.3 h1:7M3LGVDsqcd0VZH2U+x393obrzZisp7C0uEe921i
github.com/itchyny/timefmt-go v0.1.3/go.mod h1:0osSSCQSASBJMsIZnhAaF1C2fCBTJZXrnj37mG8/c+A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jcchavezs/porto v0.3.0 h1:JSKeMsqexngzHUpiv4NPPADSNBF9bDyavGRDWedzNeM=
github.com/jcchavezs/porto v0.3.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A=
github.com/jcchavezs/porto v0.4.0 h1:Zj7RligrxmDdKGo6fBO2xYAHxEgrVBfs1YAja20WbV4=
github.com/jcchavezs/porto v0.4.0/go.mod h1:fESH0gzDHiutHRdX2hv27ojnOVFco37hg1W6E9EZF4A=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jgautheron/goconst v1.5.1 h1:HxVbL1MhydKs8R8n/HE5NPvzfaYmQJA3o879lE4+WcM=
github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4=

View File

@ -15,7 +15,7 @@
//go:build tools
// +build tools
package tools
package tools // import "go.opentelemetry.io/otel/internal/tools"
import (
_ "github.com/client9/misspell/cmd/misspell"

View File

@ -13,7 +13,7 @@
// limitations under the License.
// Package noop provides noop tracing implementations for tracer and span.
package noop
package noop // import "go.opentelemetry.io/otel/internal/trace/noop"
import (
"context"

View File

@ -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/sdk/internal"
import (
"strings"