-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move advanced features to package documentation (#1163)
The documentation for parameter structs, result structs, named values, optional values, value groups, etc. is currently scattered between In and Out. First, on the logistics end: this has made it impossible to link to some of these docs because they share the same hadings: https://pkg.go.dev/go.uber.org/fx#hdr-Named_Values goes to the named values section of fx.In. It's not possible to link to the named values section of the fx.Out struct (which is also called Named Values). More importantly, from the doc readability point of view, jumping between In and Out is annoying and doesn't make for good reading. This PR moves these to the package-level docs and improves the flow of how this information is presented: First, we introduce parameter and result structs. Then we weave through the two introducing various topics: Producing named values Result structs Consuming named values Parameter structs Optional dependencies Parameter structs Producing value groups Result structs Consuming value groups Parameter structs Soft value groups Parameter structs Value group flattening Result structs Unexported fields Parameter structs This makes the story of these topics a bit easier to follow. In the future, we can introduce annotation right after parameter and result structs, or between value groups and soft value groups. Note that this does not touch on the core operations (provide, invoke, decorate). It's just moving existing documentation around.
- Loading branch information
Showing
2 changed files
with
340 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.