I have PiHole running on a cloud VM that’s a part of my Tailscale network, and I configure Tailscale to use it for DNS resolution so that everything in my network has access to it.
Cool library. Two small generic Go library issues:
1. The rebuf.Init function panics. I almost never want a library to call panic, and when it does, I want the library function to denote that. The convention I’ve seen most often is to start the function name with Must, so MustInit instead of Init. In this case though, I think it’d be safe to be a little more lenient in what you accept as input and trim the trailing slash.
2. I never (not almost, actually never) want library code to call any of the fmt.Print functions unless the library is explicitly for writing output, or that behavior is strictly opt in. If the library really must print things, it should take a user supplied os.Writer and write to that. Let the user control what gets printed or not.
Based on the child thread about zap vs slog I think I might not have been clear in my phrasing. The issue isn’t the specific functions used to print to the screen, it’s that library code is doing it at all. As the user of a library, I don’t want that library printing things to the screen if I don’t explicitly tell it to; decisions on logging/printing text to the screen are the responsibility of the person writing the end-user application code, not the library author. If the library author feels really strongly about printing stuff on the screen, they should make that behavior opt in, either with a configuration option or by providing some other mechanism that gives the user as much control over that behavior as possible (hence my example of throwing printing behavior into a user-supplied io.Writer)
I went there on mobile Safari and the UI just let me go between Free and Ad Supported, saying “Subscribed” next to the option I just clicked, regardless of the fact that I don’t have an account or the plugin installed. So that seems nice and trustworthy.
Given that the author died last Wednesday—this being her last post is likely why it’s front page of HN—I suspect your writing advice might go ignored in this case.