Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract Go comments from "main" package too
ExtractGoComments() uses the fully-qualified package path when creating keys in our CommentMap, but we perform lookups in that map using keys constructed using (reflect.Type)PkgPath(). The latter method always returns "main" for types defined in the "main" package, rather than a fully-qualified package path, so those lookups fail. The result is that we never incorporate comments into a schema for types defined in "main". Update ExtractGoComments() to handle the special case of "main".
- Loading branch information