We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0804f72 commit e85639cCopy full SHA for e85639c
future.go
@@ -46,7 +46,7 @@ func (f *Future[T]) reject(err error) {
46
}
47
48
49
-// Catch is called when Future is resolved. It returns a new Future.
+// Then is called when Future is resolved. It returns a new Future.
50
func (f *Future[T]) Then(cb func(T) (T, error)) *Future[T] {
51
f.mu.Lock()
52
defer f.mu.Unlock()
@@ -171,7 +171,7 @@ func (f *Future[T]) Result() Result[T] {
171
return TupleToResult(f.Collect())
172
173
174
-// Result wraps Collect and returns a Result.
+// Either wraps Collect and returns a Either.
175
func (f *Future[T]) Either() Either[error, T] {
176
v, err := f.Collect()
177
if err != nil {
0 commit comments