Skip to content

Commit a5e430b

Browse files
committed
added documentation to Result structs
1 parent 1c0c9de commit a5e430b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

try/out.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,22 @@ type (
1111
// ErrFn is function type for try.OutX handlers.
1212
ErrFn = func(err error) error
1313

14-
// Result is the base of our error handling DSL for try.Out functions.
14+
// Result is the base of our error handling language for try.Out functions.
1515
Result struct {
16+
// Err holds the error value returned from try.Out function result.
1617
Err error
1718
}
1819

1920
// Result1 is the base of our error handling DSL for try.Out1 functions.
2021
Result1[T any] struct {
22+
// Val1 holds the first value returned from try.Out1 function result.
2123
Val1 T
2224
Result
2325
}
2426

2527
// Result2 is the base of our error handling DSL for try.Out2 functions.
2628
Result2[T any, U any] struct {
29+
// Val2 holds the first value returned from try.Out2 function result.
2730
Val2 U
2831
Result1[T]
2932
}

0 commit comments

Comments
 (0)