mirror of
https://bitbucket.org/s_l_teichmann/mtsatellite
synced 2025-06-29 22:51:10 +02:00
fix error strings
This commit is contained in:
@ -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 (
|
||||
|
@ -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) {
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user