Skip to content

Show HN: Go framework with builtin OpenAPI support

github.com/danielgtaylor
8 pointsck_one2 comments
On HN

Comments

This looks really useful. I look forward to test driving it.

Just from the Readme, I have one question. It looks like it's necessary to register a hook to start serve the router. Is there a use case for _not_ registering that hook?

Not really. 99% of the time you would register the start hook, and it's a good idea to register a stop hook as well. Keep in mind the CLI is completely optional so if you already use the built-in option parsing or Cobra or something else you can keep using that.

I guess if for example you were just using Huma to generate OpenAPI from some Go code and dump that to the terminal or a file you might skip the start hook.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.