diff --git a/Makefile b/Makefile index 5dc924ba..b00c86ff 100644 --- a/Makefile +++ b/Makefile @@ -56,13 +56,13 @@ ${GOBIN}/enumer:; calculate_coverage: echo "mode: atomic" > coverage.txt for d in $$(go list ./...); do \ - go test -race -covermode=atomic -coverprofile=profile.out -coverpkg=github.com/muir/xop-go/... $$d; \ + go test -race -covermode=atomic -coverprofile=profile.out -coverpkg=github.com/xoplog/xop-go/... $$d; \ if [ -f profile.out ]; then \ grep -v ^mode profile.out >> coverage.txt; \ rm profile.out; \ fi; \ done - XOPLEVEL_xoptestutil=debug go test -covermode=atomic -tags xoptesting -coverprofile=profile.out -coverpkg=github.com/muir/xop-go/... ./xoptest/xoptestutil -run TestAdjustedLevelLogger -count 1 + XOPLEVEL_xoptestutil=debug go test -covermode=atomic -tags xoptesting -coverprofile=profile.out -coverpkg=github.com/xoplog/xop-go/... ./xoptest/xoptestutil -run TestAdjustedLevelLogger -count 1 if [ -f profile.out ]; then \ grep -v ^mode profile.out >> coverage.txt; \ rm profile.out; \ diff --git a/README.md b/README.md index 06af7a59..61450ea8 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Development status -In development, almost ready for use. +Ready to use, not yet stable. Expect the following changes at some point @@ -23,10 +23,11 @@ Expect the following changes at some point - main xop top-level - utility/support functions like xopat - - bundled base loggers and xopbase - - indiviual base loggers that have imports + - xopbase (because it needs to be versioned separately) + - split out packages that have external dependencies - xopotel + - xopresty - Additional gateway base loggers will be written diff --git a/base.go b/base.go index 36a52bfb..9dcef3f6 100644 --- a/base.go +++ b/base.go @@ -1,7 +1,7 @@ package xop import ( - "github.com/muir/xop-go/xopbase" + "github.com/xoplog/xop-go/xopbase" ) type loggers struct { diff --git a/basegroup.go b/basegroup.go index 41974137..2721e724 100644 --- a/basegroup.go +++ b/basegroup.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" ) type ( diff --git a/basegroup.zzzgo b/basegroup.zzzgo index 83657020..e01d1a6d 100644 --- a/basegroup.zzzgo +++ b/basegroup.zzzgo @@ -4,10 +4,10 @@ import ( "sync" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" ) type baseLoggers []xopbase.Logger diff --git a/context.go b/context.go index 5d3db0d2..65f78544 100644 --- a/context.go +++ b/context.go @@ -8,7 +8,7 @@ import ( "strconv" "strings" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/xopnum" ) type contextKeyType struct{} @@ -167,9 +167,9 @@ func adjustConfig(opts []AdjusterOption) xopnum.Level { frames := runtime.CallersFrames(pc) frame, _ := frames.Next() if frame.Function != "" { - // Example: github.com/muir/xop-go/xoptest/xoptestutil.foo.Context - // Example: github.com/muir/xop-go/xoptest/xoptestutil.TestAdjusterContext - // Example: github.com/muir/xop-go/xoptest/xoptestutil.init + // Example: github.com/xoplog/xop-go/xoptest/xoptestutil.foo.Context + // Example: github.com/xoplog/xop-go/xoptest/xoptestutil.TestAdjusterContext + // Example: github.com/xoplog/xop-go/xoptest/xoptestutil.init base := filepath.Base(frame.Function) parts := strings.SplitN(base, ".", 2) if len(parts) == 2 { diff --git a/go.mod b/go.mod index 760fa052..c29e8fc1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/muir/xop-go +module github.com/xoplog/xop-go go 1.16 diff --git a/internal/enumer_test.go b/internal/enumer_test.go index fccf31ec..bb13a139 100644 --- a/internal/enumer_test.go +++ b/internal/enumer_test.go @@ -8,10 +8,10 @@ import ( "strings" "testing" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopconst" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopconst" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoptest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/enumer_test.zzzgo b/internal/enumer_test.zzzgo index c2bb307b..a73c4751 100644 --- a/internal/enumer_test.zzzgo +++ b/internal/enumer_test.zzzgo @@ -5,7 +5,7 @@ import ( "strconv" "testing" - "github.com/muir/xop-go/xopbase" + "github.com/xoplog/xop-go/xopbase" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/line.go b/line.go index d20fdae5..93285c6d 100644 --- a/line.go +++ b/line.go @@ -6,9 +6,9 @@ import ( "fmt" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" "github.com/mohae/deepcopy" ) diff --git a/line.zzzgo b/line.zzzgo index 8f7f2463..da81491d 100644 --- a/line.zzzgo +++ b/line.zzzgo @@ -1,8 +1,8 @@ package xop import ( - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" "github.com/mohae/deepcopy" ) diff --git a/logger.go b/logger.go index d03c9f33..c8eb7213 100644 --- a/logger.go +++ b/logger.go @@ -7,9 +7,9 @@ import ( "sync/atomic" "time" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoputil" ) type Log struct { diff --git a/seed.go b/seed.go index d5e93f81..bc180178 100644 --- a/seed.go +++ b/seed.go @@ -6,7 +6,7 @@ import ( "context" "time" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) // Seed is used to create a Log. diff --git a/seed.zzzgo b/seed.zzzgo index 73d03d16..3c7fff40 100644 --- a/seed.zzzgo +++ b/seed.zzzgo @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) // Seed is used to create a Log. diff --git a/span.go b/span.go index 9cb20a47..b0c00f81 100644 --- a/span.go +++ b/span.go @@ -5,8 +5,8 @@ package xop import ( "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" "github.com/mohae/deepcopy" ) diff --git a/span.zzzgo b/span.zzzgo index 6d32caa4..de68a4c5 100644 --- a/span.zzzgo +++ b/span.zzzgo @@ -1,8 +1,8 @@ package xop import ( - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" "github.com/mohae/deepcopy" ) diff --git a/sub.go b/sub.go index 8109b2d6..2c6ffe61 100644 --- a/sub.go +++ b/sub.go @@ -7,11 +7,11 @@ import ( "sync/atomic" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopconst" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopconst" + "github.com/xoplog/xop-go/xopnum" ) // Sub holds an ephermal state of a log being tranformed to a new log. diff --git a/sub.zzzgo b/sub.zzzgo index 33687f47..65f9abe9 100644 --- a/sub.zzzgo +++ b/sub.zzzgo @@ -4,10 +4,10 @@ import ( "strconv" "sync/atomic" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopconst" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopconst" + "github.com/xoplog/xop-go/xopnum" ) // Sub holds an ephermal state of a log being tranformed to a new log. diff --git a/sub_test.go b/sub_test.go index 8e26d416..ccae825a 100644 --- a/sub_test.go +++ b/sub_test.go @@ -2,8 +2,8 @@ package xop import ( "errors" - "github.com/muir/xop-go/xopnum" "github.com/stretchr/testify/assert" + "github.com/xoplog/xop-go/xopnum" "testing" "time" ) diff --git a/trace/trace_test.go b/trace/trace_test.go index ccd92346..25c3bcf6 100644 --- a/trace/trace_test.go +++ b/trace/trace_test.go @@ -3,7 +3,7 @@ package trace_test import ( "testing" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" "github.com/stretchr/testify/assert" ) diff --git a/xopat/attributes.go b/xopat/attributes.go index 320c230c..d7438ca3 100644 --- a/xopat/attributes.go +++ b/xopat/attributes.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) // Attribute is the base type for the keys that are used to add @@ -41,7 +41,7 @@ type Attribute struct { var DefaultNamespace = os.Args[0] // Make is used to construct attributes. -// Some keys are reserved. See https://github.com/muir/xop-go/blob/main/xopconst/reserved.go +// Some keys are reserved. See https://github.com/xoplog/xop-go/blob/main/xopconst/reserved.go // for the list of reserved keys. Some keys are already registered. type Make struct { Key string // the attribute name diff --git a/xopat/attributes.zzzgo b/xopat/attributes.zzzgo index a64a5c54..bbdf3e7a 100644 --- a/xopat/attributes.zzzgo +++ b/xopat/attributes.zzzgo @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) // Attribute is the base type for the keys that are used to add @@ -39,7 +39,7 @@ type Attribute struct { var DefaultNamespace = os.Args[0] // Make is used to construct attributes. -// Some keys are reserved. See https://github.com/muir/xop-go/blob/main/xopconst/reserved.go +// Some keys are reserved. See https://github.com/xoplog/xop-go/blob/main/xopconst/reserved.go // for the list of reserved keys. Some keys are already registered. type Make struct { Key string // the attribute name diff --git a/xopbase/base.go b/xopbase/base.go index 31ca0ec1..e6e659eb 100644 --- a/xopbase/base.go +++ b/xopbase/base.go @@ -15,9 +15,9 @@ import ( "context" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopnum" ) // Logger is the bottom half of a logger -- the part that actually diff --git a/xopbase/base.zzzgo b/xopbase/base.zzzgo index eeeedfab..45ec3957 100644 --- a/xopbase/base.zzzgo +++ b/xopbase/base.zzzgo @@ -13,9 +13,9 @@ import ( "context" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopnum" ) // Logger is the bottom half of a logger -- the part that actually diff --git a/xopbytes/bytelogger.go b/xopbytes/bytelogger.go index 01bcd4c6..7a5b4341 100644 --- a/xopbytes/bytelogger.go +++ b/xopbytes/bytelogger.go @@ -2,7 +2,7 @@ package xopbytes import ( - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) type BytesWriter interface { diff --git a/xopbytes/iowriter.go b/xopbytes/iowriter.go index 4f0632be..7e019328 100644 --- a/xopbytes/iowriter.go +++ b/xopbytes/iowriter.go @@ -3,7 +3,7 @@ package xopbytes import ( "io" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) var _ BytesWriter = IOWriter{} diff --git a/xopconst/otel.go b/xopconst/otel.go index 84c6e949..54a4ae08 100644 --- a/xopconst/otel.go +++ b/xopconst/otel.go @@ -1,7 +1,7 @@ package xopconst import ( - "github.com/muir/xop-go/xopat" + "github.com/xoplog/xop-go/xopat" ) // The descriptions are lifted from https://opentelemetry.io/ and are thus Copyright(c) diff --git a/xopconst/standard.go b/xopconst/standard.go index 2318597c..dc2f19c6 100644 --- a/xopconst/standard.go +++ b/xopconst/standard.go @@ -2,7 +2,7 @@ package xopconst import ( - "github.com/muir/xop-go/xopat" + "github.com/xoplog/xop-go/xopat" ) // ParentLink is added automatically by xop in all situations where the information is present diff --git a/xopjson/attributes.go b/xopjson/attributes.go index 03f9cef3..8a1e44aa 100644 --- a/xopjson/attributes.go +++ b/xopjson/attributes.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xoputil" ) const ( diff --git a/xopjson/attributes.zzzgo b/xopjson/attributes.zzzgo index 6315ba77..41dc91c6 100644 --- a/xopjson/attributes.zzzgo +++ b/xopjson/attributes.zzzgo @@ -4,9 +4,9 @@ import ( "encoding/json" "sync" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xoputil" ) const numSinglePrealloc = 20 diff --git a/xopjson/jsonlogger.go b/xopjson/jsonlogger.go index 73ddf003..0a7e7910 100644 --- a/xopjson/jsonlogger.go +++ b/xopjson/jsonlogger.go @@ -11,12 +11,12 @@ import ( "sync/atomic" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopbytes" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopbytes" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoputil" "github.com/google/uuid" ) diff --git a/xopjson/jsonlogger.zzzgo b/xopjson/jsonlogger.zzzgo index 9548996f..2f6b87f0 100644 --- a/xopjson/jsonlogger.zzzgo +++ b/xopjson/jsonlogger.zzzgo @@ -9,12 +9,12 @@ import ( "sync/atomic" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopbytes" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopbytes" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoputil" "github.com/google/uuid" ) diff --git a/xopjson/jsonlogger_test.go b/xopjson/jsonlogger_test.go index 8b5810e2..f8c6b446 100644 --- a/xopjson/jsonlogger_test.go +++ b/xopjson/jsonlogger_test.go @@ -6,15 +6,15 @@ import ( "testing" "time" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopbytes" - "github.com/muir/xop-go/xopjson" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoptest" - "github.com/muir/xop-go/xoptest/xoptestutil" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopbytes" + "github.com/xoplog/xop-go/xopjson" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoptest" + "github.com/xoplog/xop-go/xoptest/xoptestutil" + "github.com/xoplog/xop-go/xoputil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/xopjson/models.go b/xopjson/models.go index 129ed62a..223a5245 100644 --- a/xopjson/models.go +++ b/xopjson/models.go @@ -5,11 +5,11 @@ import ( "sync" "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopbytes" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopbytes" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoputil" "github.com/google/uuid" ) diff --git a/xopmiddle/middleware.go b/xopmiddle/middleware.go index e8b872f3..a1b21651 100644 --- a/xopmiddle/middleware.go +++ b/xopmiddle/middleware.go @@ -4,8 +4,8 @@ import ( "context" "net/http" - "github.com/muir/xop-go" - "github.com/muir/xop-go/xopconst" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/xopconst" ) type Inbound struct { diff --git a/xopmiddle/middleware_test.go b/xopmiddle/middleware_test.go index 7ef6a845..3fd319cd 100644 --- a/xopmiddle/middleware_test.go +++ b/xopmiddle/middleware_test.go @@ -5,9 +5,9 @@ import ( "net/http/httptest" "testing" - "github.com/muir/xop-go" - "github.com/muir/xop-go/xopmiddle" - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/xopmiddle" + "github.com/xoplog/xop-go/xoptest" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/xopmiddle/utils.go b/xopmiddle/utils.go index 53143a54..102acdf7 100644 --- a/xopmiddle/utils.go +++ b/xopmiddle/utils.go @@ -3,7 +3,7 @@ package xopmiddle import ( "regexp" - "github.com/muir/xop-go/trace" + "github.com/xoplog/xop-go/trace" ) // SetByParentTraceHeader sets bundle.ParentTrace.TraceID and diff --git a/xopotel/models.go b/xopotel/models.go index a9e2ce54..7a041a35 100644 --- a/xopotel/models.go +++ b/xopotel/models.go @@ -5,9 +5,9 @@ import ( "context" "sync" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" "go.opentelemetry.io/otel/attribute" oteltrace "go.opentelemetry.io/otel/trace" diff --git a/xopotel/otel.go b/xopotel/otel.go index fd7d2d2d..8781aa37 100644 --- a/xopotel/otel.go +++ b/xopotel/otel.go @@ -12,12 +12,12 @@ import ( "strings" "time" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoputil" "github.com/google/uuid" "go.opentelemetry.io/otel/attribute" diff --git a/xopotel/otel.zzzgo b/xopotel/otel.zzzgo index 8962e705..65ef415a 100644 --- a/xopotel/otel.zzzgo +++ b/xopotel/otel.zzzgo @@ -10,11 +10,11 @@ import ( "strings" "time" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoputil" "github.com/google/uuid" "go.opentelemetry.io/otel/attribute" diff --git a/xopotel/otel_test.go b/xopotel/otel_test.go index 7d1ac21d..7f0196d4 100644 --- a/xopotel/otel_test.go +++ b/xopotel/otel_test.go @@ -8,14 +8,14 @@ import ( "testing" "time" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xopotel" - "github.com/muir/xop-go/xoptest" - "github.com/muir/xop-go/xoptest/xoptestutil" - "github.com/muir/xop-go/xoputil" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xopotel" + "github.com/xoplog/xop-go/xoptest" + "github.com/xoplog/xop-go/xoptest/xoptestutil" + "github.com/xoplog/xop-go/xoputil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/xopresty/resty.go b/xopresty/resty.go index ef2ae6fa..6d643363 100644 --- a/xopresty/resty.go +++ b/xopresty/resty.go @@ -30,9 +30,9 @@ import ( "strings" "time" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopconst" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopconst" "github.com/muir/resty" "github.com/pkg/errors" diff --git a/xopresty/resty_test.go b/xopresty/resty_test.go index 43c72e9f..f99823aa 100644 --- a/xopresty/resty_test.go +++ b/xopresty/resty_test.go @@ -7,11 +7,11 @@ import ( "net/http/httptest" "testing" - "github.com/muir/xop-go" - "github.com/muir/xop-go/xopmiddle" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xopresty" - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/xopmiddle" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xopresty" + "github.com/xoplog/xop-go/xoptest" "github.com/muir/resty" "github.com/stretchr/testify/assert" diff --git a/xoptest/redact_test.go b/xoptest/redact_test.go index 1ee578cd..d60e352f 100644 --- a/xoptest/redact_test.go +++ b/xoptest/redact_test.go @@ -5,13 +5,13 @@ import ( "strings" "testing" - "github.com/muir/xop-go" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xoptest" "github.com/mohae/deepcopy" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type selfRedactor struct { @@ -42,7 +42,7 @@ func TestRedaction(t *testing.T) { }) settings.SetRedactAnyFunc(func(baseLine xopbase.Line, k string, v interface{}, alreadyImmutable bool) { if !alreadyImmutable { - v = deepcopy.Copy(v) + v = deepcopy.Copy(v) } if canRedact, ok := v.(redactor); ok { baseLine.Any(k, canRedact.Redact()) @@ -51,7 +51,7 @@ func TestRedaction(t *testing.T) { } }) settings.SetRedactErrorFunc(func(baseLine xopbase.Line, k string, v error) { - baseLine.String(k, v.Error() + "(as string)", xopbase.ErrorDataType) + baseLine.String(k, v.Error()+"(as string)", xopbase.ErrorDataType) }) }), ).Request(t.Name()) @@ -71,9 +71,9 @@ func TestRedaction(t *testing.T) { require.NotEmpty(t, foos, "foo line") assert.Equal(t, "nothing in my garden is taller than my daisy!", foos[0].Data["garden"], "garden") - assert.Equal(t, "I got the contract with a small consideration, just a sunflower cookie", foos[0].Data["story"].(selfRedactor).V, "story") - assert.Equal(t, "I got the contract with a small consideration, just a sunflower cookie", foos[0].Data["tale"].(selfRedactor).V, "tale") - assert.Equal(t, "I got the contract with a small bribe, just a sunflower cookie", foos[0].Data["raw"].(selfRedactor).V, "raw") - assert.Equal(t, "I got the contract with a small bribe, just a daisy cookie", foos[0].Data["success"], "success") - assert.Equal(t, "outer: inner(as string)", foos[0].Data["oops"], "oops") + assert.Equal(t, "I got the contract with a small consideration, just a sunflower cookie", foos[0].Data["story"].(selfRedactor).V, "story") + assert.Equal(t, "I got the contract with a small consideration, just a sunflower cookie", foos[0].Data["tale"].(selfRedactor).V, "tale") + assert.Equal(t, "I got the contract with a small bribe, just a sunflower cookie", foos[0].Data["raw"].(selfRedactor).V, "raw") + assert.Equal(t, "I got the contract with a small bribe, just a daisy cookie", foos[0].Data["success"], "success") + assert.Equal(t, "outer: inner(as string)", foos[0].Data["oops"], "oops") } diff --git a/xoptest/testlogger.go b/xoptest/testlogger.go index 3a08e1c9..6fd26767 100644 --- a/xoptest/testlogger.go +++ b/xoptest/testlogger.go @@ -14,11 +14,11 @@ import ( "time" "github.com/google/uuid" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" ) //go:generate enumer -type=EventType -linecomment -json -sql diff --git a/xoptest/testlogger.zzzgo b/xoptest/testlogger.zzzgo index 67324420..bb8b9dfe 100644 --- a/xoptest/testlogger.zzzgo +++ b/xoptest/testlogger.zzzgo @@ -12,11 +12,11 @@ import ( "time" "github.com/google/uuid" - "github.com/muir/xop-go" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopnum" ) //go:generate enumer -type=EventType -linecomment -json -sql diff --git a/xoptest/testlogger_test.go b/xoptest/testlogger_test.go index 8623cb6f..56878462 100644 --- a/xoptest/testlogger_test.go +++ b/xoptest/testlogger_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/muir/xop-go/xopbase" - "github.com/muir/xop-go/xopconst" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoptest" "github.com/stretchr/testify/assert" + "github.com/xoplog/xop-go/xopbase" + "github.com/xoplog/xop-go/xopconst" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoptest" ) func TestLogMethods(t *testing.T) { diff --git a/xoptest/xoptestutil/cases.go b/xoptest/xoptestutil/cases.go index aff4439e..fff97032 100644 --- a/xoptest/xoptestutil/cases.go +++ b/xoptest/xoptestutil/cases.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/muir/xop-go" - "github.com/muir/xop-go/xopconst" - "github.com/muir/xop-go/xopnum" - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/xopconst" + "github.com/xoplog/xop-go/xopnum" + "github.com/xoplog/xop-go/xoptest" "github.com/stretchr/testify/assert" ) diff --git a/xoptest/xoptestutil/contextlevel_test.go b/xoptest/xoptestutil/contextlevel_test.go index 8f27b048..03807f60 100644 --- a/xoptest/xoptestutil/contextlevel_test.go +++ b/xoptest/xoptestutil/contextlevel_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "github.com/muir/xop-go" - "github.com/muir/xop-go/xopnum" + "github.com/xoplog/xop-go" + "github.com/xoplog/xop-go/xopnum" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -88,7 +88,7 @@ func (f foo) Context() func(context.Context) *xop.Log { func (f foo) Logger() func(*xop.Log) *xop.Log { return xop.LevelAdjuster(f...) } - + func TestAdjusterMethod(t *testing.T) { var getLoggerError = foo{xop.WithDefault(xopnum.ErrorLevel)}.Logger() var getContextInfo = foo{xop.WithDefault(xopnum.InfoLevel)}.Context() @@ -104,4 +104,3 @@ func TestAdjusterMethod(t *testing.T) { assert.Equal(t, wantInfo, getContextInfo(ctx).Settings().GetMinLevel()) assert.Equal(t, wantError, getLoggerError(xop.Default).Settings().GetMinLevel()) } - diff --git a/xoptest/xoptestutil/counts.go b/xoptest/xoptestutil/counts.go index 7be03877..a0450794 100644 --- a/xoptest/xoptestutil/counts.go +++ b/xoptest/xoptestutil/counts.go @@ -1,7 +1,7 @@ package xoptestutil import ( - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go/xoptest" ) func EventCount(tlog *xoptest.TestLogger, typ xoptest.EventType) int { diff --git a/xoptest/xoptestutil/dump.go b/xoptest/xoptestutil/dump.go index b915e20f..fc9b68c6 100644 --- a/xoptest/xoptestutil/dump.go +++ b/xoptest/xoptestutil/dump.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/muir/xop-go/xoptest" + "github.com/xoplog/xop-go/xoptest" ) func DumpEvents(t testing.TB, tlog *xoptest.TestLogger) { diff --git a/xoptest/xoptestutil/enums.go b/xoptest/xoptestutil/enums.go index 3e36db93..0791d2aa 100644 --- a/xoptest/xoptestutil/enums.go +++ b/xoptest/xoptestutil/enums.go @@ -3,8 +3,8 @@ package xoptestutil import ( - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopconst" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopconst" ) type AnyObject struct { diff --git a/xoptest/xoptestutil/enums.zzzgo b/xoptest/xoptestutil/enums.zzzgo index 8389f91c..2cba7b28 100644 --- a/xoptest/xoptestutil/enums.zzzgo +++ b/xoptest/xoptestutil/enums.zzzgo @@ -1,8 +1,8 @@ package xoptestutil import ( - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopconst" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopconst" ) type AnyObject struct { diff --git a/xoptest/xoptestutil/timestamp_test.go b/xoptest/xoptestutil/timestamp_test.go index 5db61e08..d0bf4737 100644 --- a/xoptest/xoptestutil/timestamp_test.go +++ b/xoptest/xoptestutil/timestamp_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/muir/xop-go/xoptest/xoptestutil" + "github.com/xoplog/xop-go/xoptest/xoptestutil" "github.com/stretchr/testify/assert" ) diff --git a/xoputil/skip.go b/xoputil/skip.go index 4c7c0c9f..85617af7 100644 --- a/xoputil/skip.go +++ b/xoputil/skip.go @@ -5,9 +5,9 @@ package xoputil import ( "time" - "github.com/muir/xop-go/trace" - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" + "github.com/xoplog/xop-go/trace" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" ) var SkipLine = skipLine{} diff --git a/xoputil/skip.zzzgo b/xoputil/skip.zzzgo index bfc8ed7e..8c7047c5 100644 --- a/xoputil/skip.zzzgo +++ b/xoputil/skip.zzzgo @@ -1,8 +1,8 @@ package xoputil import ( - "github.com/muir/xop-go/xopat" - "github.com/muir/xop-go/xopbase" + "github.com/xoplog/xop-go/xopat" + "github.com/xoplog/xop-go/xopbase" ) var SkipLine = skipLine{}