14 lines
392 B
Go
14 lines
392 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package migration // import "go.opentelemetry.io/collector/service/telemetry/internal/migration"
|
|
|
|
import "strings"
|
|
|
|
func normalizeEndpoint(endpoint string) *string {
|
|
if !strings.HasPrefix(endpoint, "https://") && !strings.HasPrefix(endpoint, "http://") {
|
|
endpoint = "http://" + endpoint
|
|
}
|
|
return &endpoint
|
|
}
|