From 86c8376f54955d8a3ad346ddde713a568331c08c Mon Sep 17 00:00:00 2001 From: Levente Batuska Date: Tue, 15 Oct 2024 13:26:44 +0200 Subject: [PATCH] refactor(Assert)!: harmonize naming 2 --- assert/assert.go | 2 +- type/optional.go | 6 +++--- type/result.go | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/assert/assert.go b/assert/assert.go index 3192165..243d77a 100644 --- a/assert/assert.go +++ b/assert/assert.go @@ -1,4 +1,4 @@ -package assert +package Assert import ( "fmt" diff --git a/type/optional.go b/type/optional.go index f8f0f89..afc6d46 100644 --- a/type/optional.go +++ b/type/optional.go @@ -1,6 +1,6 @@ package Type -import "github.com/lbatuska/goutils/assert" +import Assert "github.com/lbatuska/goutils/assert" // CTORS BEGIN func Some[T any](value T) Optional[T] { @@ -41,7 +41,7 @@ func (opt *Optional[T]) HasValue() bool { // UNWRAPPABLE INTERFACE BEGIN func (opt *Optional[T]) Expect(msg string) T { - assert.NotNil(opt) + Assert.NotNil(opt) if opt.present { return opt.value } @@ -49,7 +49,7 @@ func (opt *Optional[T]) Expect(msg string) T { } func (opt *Optional[T]) Unwrap() T { - assert.NotNil(opt) + Assert.NotNil(opt) if opt.present { return opt.value } diff --git a/type/result.go b/type/result.go index 115ef32..71acae3 100644 --- a/type/result.go +++ b/type/result.go @@ -3,7 +3,7 @@ package Type import ( "errors" - "github.com/lbatuska/goutils/assert" + Assert "github.com/lbatuska/goutils/assert" ) // CTORS BEGIN @@ -44,7 +44,7 @@ func (res *Result[T]) HasValue() bool { // UNWRAPPABLE INTERFACE func (res *Result[T]) Expect(msg string) T { - assert.NotNil(res) + Assert.NotNil(res) if res.err == nil { return res.value } @@ -52,7 +52,7 @@ func (res *Result[T]) Expect(msg string) T { } func (res *Result[T]) Unwrap() T { - assert.NotNil(res) + Assert.NotNil(res) if res.err == nil { return res.value }