From 19be05c53f11474ac0d1bf248b4a48a4c75100e0 Mon Sep 17 00:00:00 2001 From: ET Date: Wed, 1 Jul 2020 20:28:45 -0700 Subject: [PATCH] Include emicklei/go-restful in directory move (#120) --- .../{ => github.com}/emicklei/go-restful/config.go | 0 instrumentation/{ => github.com}/emicklei/go-restful/doc.go | 2 +- .../{ => github.com}/emicklei/go-restful/example/Dockerfile | 2 +- .../{ => github.com}/emicklei/go-restful/example/README.md | 0 .../emicklei/go-restful/example/docker-compose.yml | 2 +- .../{ => github.com}/emicklei/go-restful/example/server.go | 2 +- instrumentation/{ => github.com}/emicklei/go-restful/go.mod | 4 ++-- instrumentation/{ => github.com}/emicklei/go-restful/go.sum | 0 .../{ => github.com}/emicklei/go-restful/restful.go | 2 +- .../{ => github.com}/emicklei/go-restful/restful_test.go | 5 +++-- 10 files changed, 10 insertions(+), 9 deletions(-) rename instrumentation/{ => github.com}/emicklei/go-restful/config.go (100%) rename instrumentation/{ => github.com}/emicklei/go-restful/doc.go (96%) rename instrumentation/{ => github.com}/emicklei/go-restful/example/Dockerfile (92%) rename instrumentation/{ => github.com}/emicklei/go-restful/example/README.md (100%) rename instrumentation/{ => github.com}/emicklei/go-restful/example/docker-compose.yml (97%) rename instrumentation/{ => github.com}/emicklei/go-restful/example/server.go (96%) rename instrumentation/{ => github.com}/emicklei/go-restful/go.mod (62%) rename instrumentation/{ => github.com}/emicklei/go-restful/go.sum (100%) rename instrumentation/{ => github.com}/emicklei/go-restful/restful.go (96%) rename instrumentation/{ => github.com}/emicklei/go-restful/restful_test.go (97%) diff --git a/instrumentation/emicklei/go-restful/config.go b/instrumentation/github.com/emicklei/go-restful/config.go similarity index 100% rename from instrumentation/emicklei/go-restful/config.go rename to instrumentation/github.com/emicklei/go-restful/config.go diff --git a/instrumentation/emicklei/go-restful/doc.go b/instrumentation/github.com/emicklei/go-restful/doc.go similarity index 96% rename from instrumentation/emicklei/go-restful/doc.go rename to instrumentation/github.com/emicklei/go-restful/doc.go index dc512590b97..cf3489eb4e7 100644 --- a/instrumentation/emicklei/go-restful/doc.go +++ b/instrumentation/github.com/emicklei/go-restful/doc.go @@ -18,4 +18,4 @@ // Instrumentation of an incoming request is achieved via a go-restful // FilterFunc which may be applied at the container level, at the // webservice level or at a route level -package restful // import "go.opentelemetry.io/contrib/instrumentation/emicklei/go-restful" +package restful // import "go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful" diff --git a/instrumentation/emicklei/go-restful/example/Dockerfile b/instrumentation/github.com/emicklei/go-restful/example/Dockerfile similarity index 92% rename from instrumentation/emicklei/go-restful/example/Dockerfile rename to instrumentation/github.com/emicklei/go-restful/example/Dockerfile index ad14d6360aa..44fd5a08199 100644 --- a/instrumentation/emicklei/go-restful/example/Dockerfile +++ b/instrumentation/github.com/emicklei/go-restful/example/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. FROM golang:1.14-alpine AS base COPY . /src/ -WORKDIR /src/instrumentation/emicklei/go-restful +WORKDIR /src/instrumentation/github.com/emicklei/go-restful FROM base AS go-restful-server RUN go install ./example/server.go diff --git a/instrumentation/emicklei/go-restful/example/README.md b/instrumentation/github.com/emicklei/go-restful/example/README.md similarity index 100% rename from instrumentation/emicklei/go-restful/example/README.md rename to instrumentation/github.com/emicklei/go-restful/example/README.md diff --git a/instrumentation/emicklei/go-restful/example/docker-compose.yml b/instrumentation/github.com/emicklei/go-restful/example/docker-compose.yml similarity index 97% rename from instrumentation/emicklei/go-restful/example/docker-compose.yml rename to instrumentation/github.com/emicklei/go-restful/example/docker-compose.yml index cd67d526dda..4cb4199be82 100644 --- a/instrumentation/emicklei/go-restful/example/docker-compose.yml +++ b/instrumentation/github.com/emicklei/go-restful/example/docker-compose.yml @@ -26,7 +26,7 @@ services: go-restful-server: build: dockerfile: $PWD/Dockerfile - context: ../../../.. + context: ../../../../.. ports: - "8080:80" command: diff --git a/instrumentation/emicklei/go-restful/example/server.go b/instrumentation/github.com/emicklei/go-restful/example/server.go similarity index 96% rename from instrumentation/emicklei/go-restful/example/server.go rename to instrumentation/github.com/emicklei/go-restful/example/server.go index 4e78a794cf3..54df950fd03 100644 --- a/instrumentation/emicklei/go-restful/example/server.go +++ b/instrumentation/github.com/emicklei/go-restful/example/server.go @@ -21,7 +21,7 @@ import ( "github.com/emicklei/go-restful/v3" - restfultrace "go.opentelemetry.io/contrib/instrumentation/emicklei/go-restful" + restfultrace "go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful" otelglobal "go.opentelemetry.io/otel/api/global" otelkv "go.opentelemetry.io/otel/api/kv" oteltrace "go.opentelemetry.io/otel/api/trace" diff --git a/instrumentation/emicklei/go-restful/go.mod b/instrumentation/github.com/emicklei/go-restful/go.mod similarity index 62% rename from instrumentation/emicklei/go-restful/go.mod rename to instrumentation/github.com/emicklei/go-restful/go.mod index f03a6cd9016..a66a6386c57 100644 --- a/instrumentation/emicklei/go-restful/go.mod +++ b/instrumentation/github.com/emicklei/go-restful/go.mod @@ -1,8 +1,8 @@ -module go.opentelemetry.io/contrib/instrumentation/emicklei/go-restful +module go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful go 1.14 -replace go.opentelemetry.io/contrib => ../../.. +replace go.opentelemetry.io/contrib => ../../../.. require ( github.com/emicklei/go-restful/v3 v3.0.0 diff --git a/instrumentation/emicklei/go-restful/go.sum b/instrumentation/github.com/emicklei/go-restful/go.sum similarity index 100% rename from instrumentation/emicklei/go-restful/go.sum rename to instrumentation/github.com/emicklei/go-restful/go.sum diff --git a/instrumentation/emicklei/go-restful/restful.go b/instrumentation/github.com/emicklei/go-restful/restful.go similarity index 96% rename from instrumentation/emicklei/go-restful/restful.go rename to instrumentation/github.com/emicklei/go-restful/restful.go index 45d6b8273ee..c0dc6d4ec2f 100644 --- a/instrumentation/emicklei/go-restful/restful.go +++ b/instrumentation/github.com/emicklei/go-restful/restful.go @@ -24,7 +24,7 @@ import ( ) const ( - tracerName = "go.opentelemetry.io/contrib/instrumentation/emicklei/go-restful" + tracerName = "go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful" tracerVersion = "1.0" ) diff --git a/instrumentation/emicklei/go-restful/restful_test.go b/instrumentation/github.com/emicklei/go-restful/restful_test.go similarity index 97% rename from instrumentation/emicklei/go-restful/restful_test.go rename to instrumentation/github.com/emicklei/go-restful/restful_test.go index 2e5ed109c75..3b922925fb2 100644 --- a/instrumentation/emicklei/go-restful/restful_test.go +++ b/instrumentation/github.com/emicklei/go-restful/restful_test.go @@ -24,7 +24,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - restfultrace "go.opentelemetry.io/contrib/instrumentation/emicklei/go-restful" + restfultrace "go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful" + mocktrace "go.opentelemetry.io/contrib/internal/trace" otelglobal "go.opentelemetry.io/otel/api/global" otelvalue "go.opentelemetry.io/otel/api/kv/value" @@ -42,7 +43,7 @@ func TestChildSpanFromGlobalTracer(t *testing.T) { spanTracer := span.Tracer() mockTracer, ok := spanTracer.(*mocktrace.Tracer) require.True(t, ok) - assert.Equal(t, "go.opentelemetry.io/contrib/instrumentation/emicklei/go-restful", mockTracer.Name) + assert.Equal(t, "go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful", mockTracer.Name) resp.WriteHeader(http.StatusOK) } ws := &restful.WebService{}