Includes a fix for #26
Co-authored-by: Sam Therapy <sam@samtherapy.net>
Reviewed-on: #27
Co-authored-by: grumbulon <grumbulon@grumbulon.xyz>
Co-committed-by: grumbulon <grumbulon@grumbulon.xyz>
1. I made JSON print indented instead of inline
2. I created a util package and moved `ReverseDNS` and `ResolveHTTPS` there
3. I created a new struct called Answers where all variables for the output live now, and adjusted the response struct to have the Answers struct in it. This lets us reuse the struct more instead of having variables floating around, lets us make the response more custom, offers more understandable code reuse, and makes things (I think) more readable.
Aside: you will notice the struct has little json defs. This is because struct values encode as JSON objects and can preserve the output name this way
Most of this just makes expanding on awl easier in the future.
Co-authored-by: grumbulon <grumbulon@dismail.de>
Reviewed-on: #2
Co-authored-by: grumbulon <grumbulon@grumbulon.xyz>
Co-committed-by: grumbulon <grumbulon@grumbulon.xyz>