error strings should not be capitalized or end with punctuation

Signed-off-by: yupeng <yu.peng36@zte.com.cn>
This commit is contained in:
yupeng 2016-11-22 14:53:11 +08:00
parent e350d44dbe
commit fc11efa2db
3 changed files with 3 additions and 3 deletions

View File

@ -89,7 +89,7 @@ func ReadMemInfo() (*MemInfo, error) {
if ppKernel < 0 || MemTotal < 0 || MemFree < 0 || SwapTotal < 0 ||
SwapFree < 0 {
return nil, fmt.Errorf("Error getting system memory info %v\n", err)
return nil, fmt.Errorf("error getting system memory info %v\n", err)
}
meminfo := &MemInfo{}

View File

@ -97,7 +97,7 @@ func (ar *ansiReader) Read(p []byte) (int, error) {
copiedLength := copy(p, keyBytes)
if copiedLength != len(keyBytes) {
return 0, errors.New("Unexpected copy length encountered.")
return 0, errors.New("unexpected copy length encountered")
}
logger.Debugf("Read p[%d]: % x", copiedLength, p)

View File

@ -753,7 +753,7 @@ func parseStorageOpts(storageOpts []string) (map[string]string, error) {
opt := strings.SplitN(option, "=", 2)
m[opt[0]] = opt[1]
} else {
return nil, fmt.Errorf("Invalid storage option.")
return nil, fmt.Errorf("invalid storage option")
}
}
return m, nil