From 331c1722af54c16af638bb204d5111846c6ecba2 Mon Sep 17 00:00:00 2001 From: Levente Batuska Date: Tue, 15 Oct 2024 13:12:53 +0200 Subject: [PATCH] refactor(Type)!: harmonize naming 1 --- {typeutils => type}/interfaces.go | 2 +- {typeutils => type}/optional.go | 2 +- {typeutils => type}/result.go | 2 +- {typeutils => type}/types.go | 2 +- {typeutils => type}/utils.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename {typeutils => type}/interfaces.go (98%) rename {typeutils => type}/optional.go (99%) rename {typeutils => type}/result.go (99%) rename {typeutils => type}/types.go (86%) rename {typeutils => type}/utils.go (97%) diff --git a/typeutils/interfaces.go b/type/interfaces.go similarity index 98% rename from typeutils/interfaces.go rename to type/interfaces.go index 65460c5..f33962e 100644 --- a/typeutils/interfaces.go +++ b/type/interfaces.go @@ -1,4 +1,4 @@ -package typeutils +package Type // Created to abstract over Is_some and Is_ok type ValueContainer interface { diff --git a/typeutils/optional.go b/type/optional.go similarity index 99% rename from typeutils/optional.go rename to type/optional.go index 782cbb1..f8f0f89 100644 --- a/typeutils/optional.go +++ b/type/optional.go @@ -1,4 +1,4 @@ -package typeutils +package Type import "github.com/lbatuska/goutils/assert" diff --git a/typeutils/result.go b/type/result.go similarity index 99% rename from typeutils/result.go rename to type/result.go index 3af51d9..115ef32 100644 --- a/typeutils/result.go +++ b/type/result.go @@ -1,4 +1,4 @@ -package typeutils +package Type import ( "errors" diff --git a/typeutils/types.go b/type/types.go similarity index 86% rename from typeutils/types.go rename to type/types.go index 9dfde38..9284d16 100644 --- a/typeutils/types.go +++ b/type/types.go @@ -1,4 +1,4 @@ -package typeutils +package Type type Optional[T any] struct { value T diff --git a/typeutils/utils.go b/type/utils.go similarity index 97% rename from typeutils/utils.go rename to type/utils.go index 6cc0fcb..9f0ac61 100644 --- a/typeutils/utils.go +++ b/type/utils.go @@ -1,4 +1,4 @@ -package typeutils +package Type func Expect[T any](val Unwrappable[T], msg string) T { return val.Expect(msg)