Hand writing the spec, then validating (ie via http://gitlab.com/jamietanna/httptest-openapi) is a valid option - keeps it in sync very well from quite a few big Go apps I know using it
Or you could wrap your implementation in https://github.com/oapi-codegen/oapi-codegen/ from a hand rolled spec - we support net/http
- and that then starts towards the process of being closer to the spec
Either way, you still need to validate the spec and implementation are in sync, and IMO, hand-writing the spec is the only "right" solution that makes sure you're intentionally making changes to the API, whereas generating spec from code could lead to just documenting what's in place and ie accidental breaking changes being missed