fix error strings

This commit is contained in:
Sascha L. Teichmann
2024-01-06 10:17:25 +01:00
parent fa0ec06e36
commit 65762936a4
5 changed files with 7 additions and 7 deletions

View File

@ -18,9 +18,9 @@ import (
// Error returned if a Producer has run to its end.
var (
ErrNoMoreBlocks = errors.New("No more blocks.")
ErrMapContentSizeMismatch = errors.New("Content size does not match.")
ErrBlockTruncated = errors.New("Block is truncated.")
ErrNoMoreBlocks = errors.New("no more blocks")
ErrMapContentSizeMismatch = errors.New("content size does not match")
ErrBlockTruncated = errors.New("block is truncated")
)
const (

View File

@ -83,7 +83,7 @@ func tmpName(tmpl string) (string, error) {
rrand = reseed()
}
}
return "", errors.New("Cannot create temp name")
return "", errors.New("cannot create temp name")
}
func SaveAsPNGAtomic(path string, img image.Image) (err error) {

View File

@ -107,7 +107,7 @@ func isError(line []byte) error {
// parseSize is a cheaper replacement for fmt.Sscanf(string(line), "$%d\r\n", &size).
func parseSize(line []byte) (int, error) {
if len(line) < 1 || line[0] != '$' {
return 0, errors.New("Missing '$' at begin of line")
return 0, errors.New("missing '$' at begin of line")
}
line = bytes.TrimFunc(line[1:], unicode.IsSpace)
v, err := strconv.ParseInt(string(line), 10, 0)