2 comments

[ 2.8 ms ] story [ 18.0 ms ] thread
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.