From 8e60e8ea3e8fa632d5f119b2f5ff8ee2ad6e0e83 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Thu, 8 Aug 2024 20:27:27 -0700 Subject: [PATCH] cosmetic change --- optional_marshaljson.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/optional_marshaljson.go b/optional_marshaljson.go index 7b0c6e4..32e54c6 100644 --- a/optional_marshaljson.go +++ b/optional_marshaljson.go @@ -5,9 +5,8 @@ import ( "fmt" "reflect" - "github.com/reiver/go-json" - "github.com/reiver/go-erorr" + "github.com/reiver/go-json" ) var _ json.Marshaler = Nothing[bool]() @@ -15,7 +14,6 @@ var _ json.Marshaler = Nothing[string]() // MarshalJSON makes it so json.Marshaler is implemented. func (receiver Optional[T]) MarshalJSON() ([]byte, error) { - switch interface{}(receiver.value).(type) { case json.Marshaler, encoding.TextMarshaler, bool, int, int8, int16, int32, int64, string, uint, uint8, uint16, uint32, uint64: // these are OK.