diff --git a/errors/README.md b/errors/README.md index 3d5830f33b519f19b31f41ddbf1eaa05cd0a64b7..bcdb8400cd6276e9a0b28949d5c6de46137423a0 100644 --- a/errors/README.md +++ b/errors/README.md @@ -29,7 +29,7 @@ For lots of detail on this, see comments in error_formats_test.go and run that t ## Usage Get the package into your project: ``` -go get github.com/uafrica/go-utils +go get gitlab.com/uafrica/go-utils ``` ## func New() @@ -63,7 +63,7 @@ if err := db.Select(query); err != nil { Replace all other errors package imports with this package: ``` import ( - "github.com/uafrica/go-utils/errors" + "gitlab.com/uafrica/go-utils/errors" ) ``` @@ -115,7 +115,7 @@ Call ```err.Description()``` to get a struct that can marshal to JSON for a comp { "error": "login failed", "source": { - "package": "github.com/uafrica/go-utils/errors/errors_test", + "package": "gitlab.com/uafrica/go-utils/errors/errors_test", "file": "errors_test.go", "line": 18, "function": "TestErrorFormatting" @@ -123,7 +123,7 @@ Call ```err.Description()``` to get a struct that can marshal to JSON for a comp "cause": { "error": "failed to find account", "source": { - "package": "github.com/uafrica/go-utils/errors/errors_test", + "package": "gitlab.com/uafrica/go-utils/errors/errors_test", "file": "errors_test.go", "line": 17, "function": "TestErrorFormatting" @@ -131,7 +131,7 @@ Call ```err.Description()``` to get a struct that can marshal to JSON for a comp "cause": { "error": "query failed", "source": { - "package": "github.com/uafrica/go-utils/errors/errors_test", + "package": "gitlab.com/uafrica/go-utils/errors/errors_test", "file": "errors_test.go", "line": 16, "function": "TestErrorFormatting" diff --git a/errors/error_formats_test.go b/errors/error_formats_test.go index bd119929bd6a17dd630f7f0d5e37bf40668a7d8d..57ac758e00a80a2d5b888cf4310bdaf027f1c886 100644 --- a/errors/error_formats_test.go +++ b/errors/error_formats_test.go @@ -9,7 +9,7 @@ import ( pkg_errors "github.com/pkg/errors" - uf_errors "github.com/uafrica/go-utils/errors" + uf_errors "gitlab.com/uafrica/go-utils/errors" ) //use this struct to define various types of errors to experiment with diff --git a/errors/errors_test.go b/errors/errors_test.go index cd039f23a098c7b65a6fddb5f93717f379581c39..d2ce8992c9f79a6adc630d9f692cacb2936ce58f 100644 --- a/errors/errors_test.go +++ b/errors/errors_test.go @@ -4,7 +4,7 @@ import ( "encoding/json" "testing" - "github.com/uafrica/go-utils/errors" + "gitlab.com/uafrica/go-utils/errors" ) func TestErrorFormatting(t *testing.T) { @@ -28,7 +28,7 @@ func TestErrorFormatting(t *testing.T) { t.Logf("%%v: %v", e4) //use %+v for complete error with stack: - //-> "github.com/uafrica/go-utils/errors_test/TestErrorFormatting():errors_test.go(17): login failed, because github.com/uafrica/go-utils/errors_test/TestErrorFormatting():errors_test.go(16): failed to find account, because github.com/uafrica/go-utils/errors_test/TestErrorFormatting():errors_test.go(15): query failed, because you have problem in your SQL near xxx + //-> "gitlab.com/uafrica/go-utils/errors_test/TestErrorFormatting():errors_test.go(17): login failed, because gitlab.com/uafrica/go-utils/errors_test/TestErrorFormatting():errors_test.go(16): failed to find account, because gitlab.com/uafrica/go-utils/errors_test/TestErrorFormatting():errors_test.go(15): query failed, because you have problem in your SQL near xxx t.Logf("%%+v: %+v", e4) //you may also JSON marshal the error diff --git a/logger/global.go b/logger/global.go index ec746ab32c4ce6d58a0ce8e8f3a8e4f781c70fcf..e792d34d3fd6edf2ff71b496972a21610c17aeac 100644 --- a/logger/global.go +++ b/logger/global.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/uafrica/go-utils/errors" + "gitlab.com/uafrica/go-utils/errors" ) var logger Logger diff --git a/logger/logger.go b/logger/logger.go index 0a6419137ef080b30145af491f314cdc8213c6af..dde991bd021e9096b7e0b3ee82cbf5a1df261859 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/uafrica/go-utils/errors" + "gitlab.com/uafrica/go-utils/errors" ) type ILogger interface { diff --git a/logger/logs_test.go b/logger/logs_test.go index f27ff0af7d74078320cfc6a5d13845e19aa5dc74..0887d95059f36f44a56c9ff6bd7d8221912db5d0 100644 --- a/logger/logs_test.go +++ b/logger/logs_test.go @@ -4,8 +4,8 @@ import ( "os" "testing" - "github.com/uafrica/go-utils/errors" - "github.com/uafrica/go-utils/logger" + "gitlab.com/uafrica/go-utils/errors" + "gitlab.com/uafrica/go-utils/logger" ) func TestLogs(t *testing.T) {