Skip to content

Commit

Permalink
📝 doc
Browse files Browse the repository at this point in the history
Signed-off-by: moznion <moznion@mail.moznion.net>
  • Loading branch information
moznion committed Jun 10, 2022
1 parent ea5704f commit 762df1b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# go-optional [![.github/workflows/check.yml](https://github.com/moznion/go-optional/actions/workflows/check.yml/badge.svg)](https://github.com/moznion/go-optional/actions/workflows/check.yml) [![codecov](https://codecov.io/gh/moznion/go-optional/branch/main/graph/badge.svg?token=0HCVy6COy4)](https://codecov.io/gh/moznion/go-optional)
# go-optional [![.github/workflows/check.yml](https://github.com/moznion/go-optional/actions/workflows/check.yml/badge.svg)](https://github.com/moznion/go-optional/actions/workflows/check.yml) [![codecov](https://codecov.io/gh/moznion/go-optional/branch/main/graph/badge.svg?token=0HCVy6COy4)](https://codecov.io/gh/moznion/go-optional) [![GoDoc](https://godoc.org/github.com/moznion/go-optional?status.svg)](https://godoc.org/github.com/moznion/go-optional)

A library that provides [Go Generics](https://go.dev/blog/generics-proposal) friendly "optional" features.

Expand Down Expand Up @@ -37,9 +37,7 @@ mapped := optional.Map(none, func (v int) int {
fmt.Printf("%v\n", mapped.IsNone()) // => true
```

and more detailed examples are [here](./examples_test.go).

Also you can try this on The Go Playground for gotip: [https://gotipplay.golang.org/p/mWGdFIfcK8c](https://gotipplay.golang.org/p/mWGdFIfcK8c)
and more detailed examples are here: [./examples_test.go](./examples_test.go).

## Docs

Expand All @@ -49,11 +47,6 @@ Also you can try this on The Go Playground for gotip: [https://gotipplay.golang.

- it would be better to deal with an Option value as a non-pointer because if the Option value can accept nil it becomes worthless

## Current Status

Currently (at the moment: Nov 18, 2021), go 1.18 has not been released yet, so if you'd like to try this, please use the tip runtime.
Of course, the new runtime version hasn't been released yet so this library has the possibility to change the implementation as well.

## Known Issues

The runtime raises a compile error like "methods cannot have type parameters", so `Map()`, `MapOr()`, `MapWithError()`, `MapOrWithError()`, `Zip()`, `ZipWith()`, `Unzip()` and `UnzipWith()` have been providing as functions. Basically, it would be better to provide them as the methods, but currently, it compromises with the limitation.
Expand Down

0 comments on commit 762df1b

Please sign in to comment.