Skip to content

Commit abda254

Browse files
authored
Reference fx.Self in fx.As doc (#1202)
Add a short helpful blurb about fx.Self in fx.As doc comment.
1 parent 7dd18c6 commit abda254

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

annotated.go

+3
Original file line numberDiff line numberDiff line change
@@ -1164,6 +1164,9 @@ var _ Annotation = (*asAnnotation)(nil)
11641164
// return w, r
11651165
// }
11661166
//
1167+
// As entirely replaces the default return types of a function. In order
1168+
// to maintain the original return types when using As, see [Self].
1169+
//
11671170
// As annotation cannot be used in a function that returns an [Out] struct as a return type.
11681171
func As(interfaces ...interface{}) Annotation {
11691172
return &asAnnotation{targets: interfaces}

0 commit comments

Comments
 (0)