Yes, this is now possible with the HTTP server: httpserver.RegisterDevDirective() - but it must be used only for convenience in development!
RegisterDevDirective splices name into the list of directives immediately before another directive. This function is ONLY for plugin development purposes! NEVER use it for a plugin that you are not currently building. If before is empty, the directive will be appended to the end of the list.
It is imperative that directives execute in the proper order, and hard-coding the list of directives guarantees a correct, absolute order every time. This function is convenient when developing a plugin, but it does not guarantee absolute ordering. Multiple plugins registering directives with this function will lead to non- deterministic builds and buggy software.
Directive names must be lower-cased and unique. Any errors here are fatal, and even successful calls print a message to stdout as a reminder to use it only in development.
You can, of course, do what you want for the DNS server, however I recommend absolute ordering as the relative ordering has the potential to be buggy as it is non-deterministic.