1
0
mirror of https://github.com/IBM/fp-go.git synced 2025-08-10 22:31:32 +02:00

fix: add json serialization support for option

Signed-off-by: Dr. Carsten Leue <carsten.leue@de.ibm.com>
This commit is contained in:
Dr. Carsten Leue
2023-07-09 10:21:56 +02:00
parent c169cb42bb
commit 691ceb0675
4 changed files with 86 additions and 52 deletions

View File

@@ -11,6 +11,12 @@ import (
"github.com/stretchr/testify/assert"
)
func TestDefault(t *testing.T) {
var e Either[error, string]
assert.Equal(t, Of[error](""), e)
}
func TestIsLeft(t *testing.T) {
err := errors.New("Some error")
withError := Left[error, string](err)