terraform-plugin-go version
Use cases
The Serve functions of tfprotov5/tf5server and tfprotov6/tf6server introduce non-trivial conversion of ServeOpt into the ServeConfig and go-plugin plugin.ServeConfig, which is not currently unit tested. To prevent regressions, unit testing should be introduced with any necessary refactoring.
Proposal
Potentially refactor the server configuration preparation of Serve into its own function, then introduce unit testing against that logic.
Another option may be to refactor out ServeConfig usage, which currently implements unexported fields.
References