> http.Error is a three-line helper function for the very common case of
returning an error code with a simple message. If you want something
different, you can write your own, like you said.
Of course I have written my own error and not found handlers now, because the one in the net/http package not useful.
I can't think of any websites that show only plain/text errors and not found responses. It isn't that common at all. The quality of this package can be improved by removing the one line where it sets the Content-Type, or perhaps it could take an optional string as an argument for Content-Type.
Just a suggestion. It would be an improvement.