Skip to content

Commit

Permalink
chore(docs): minor readme clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
martianoff committed Jun 30, 2024
1 parent 88482e8 commit d136fb3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Set an empty value if v is nil, otherwise set non-empty value
v := option.NewOption[int](10)
```

Remap one option to another option
Transform underlying value of option to non option value
```
import "github.com/martianoff/go-option"
Expand All @@ -45,7 +45,7 @@ carNameOpt := option.Map[Car, string](carOpt, func(c Car) string {
})
```

Option composition
Option composition. Transform underlying value of option to another option value
```
import "github.com/martianoff/go-option"
Expand Down Expand Up @@ -85,8 +85,6 @@ carPlateOpt := option.FlatMap[Car, string](u.car, func(c Car) option.Option[stri
| Empty() | checks if value is empty |
| NonEmpty() | checks if value is set |
| String() | string representation |
| Map() | transform to another option |
| FlatMap() | compose two options |
`* - empty value will panic`

## Json serialization and deserialization
Expand Down

0 comments on commit d136fb3

Please sign in to comment.