rename variables, struct fields and functions to include an "x" when they can panic for handling errors

and document the convention in develop.txt.
spurred by running errcheck again (it has been a while). it still has too many
false to enable by default.
This commit is contained in:
Mechiel Lukkien
2025-03-24 16:02:12 +01:00
parent a2c79e25c1
commit 7a87522be0
18 changed files with 797 additions and 800 deletions

View File

@ -155,18 +155,18 @@ func (c *conn) cmdGetmetadata(tag, cmd string, p *parser) {
// Response syntax: ../rfc/5464:807 ../rfc/5464:778
// We can only send untagged responses when we have any matches.
if len(annotations) > 0 {
fmt.Fprintf(c.bw, "* METADATA %s (", mailboxt(mailboxName).pack(c))
fmt.Fprintf(c.xbw, "* METADATA %s (", mailboxt(mailboxName).pack(c))
for i, a := range annotations {
if i > 0 {
fmt.Fprint(c.bw, " ")
fmt.Fprint(c.xbw, " ")
}
astring(a.Key).writeTo(c, c.bw)
fmt.Fprint(c.bw, " ")
astring(a.Key).writeTo(c, c.xbw)
fmt.Fprint(c.xbw, " ")
if a.IsString {
string0(string(a.Value)).writeTo(c, c.bw)
string0(string(a.Value)).writeTo(c, c.xbw)
} else {
v := readerSizeSyncliteral{bytes.NewReader(a.Value), int64(len(a.Value)), true}
v.writeTo(c, c.bw)
v.writeTo(c, c.xbw)
}
}
c.bwritelinef(")")