Signed-off-by: yupeng <yu.peng36@zte.com.cn>
| ... | ... |
@@ -89,7 +89,7 @@ func ReadMemInfo() (*MemInfo, error) {
|
| 89 | 89 |
|
| 90 | 90 |
if ppKernel < 0 || MemTotal < 0 || MemFree < 0 || SwapTotal < 0 || |
| 91 | 91 |
SwapFree < 0 {
|
| 92 |
- return nil, fmt.Errorf("Error getting system memory info %v\n", err)
|
|
| 92 |
+ return nil, fmt.Errorf("error getting system memory info %v\n", err)
|
|
| 93 | 93 |
} |
| 94 | 94 |
|
| 95 | 95 |
meminfo := &MemInfo{}
|
| ... | ... |
@@ -97,7 +97,7 @@ func (ar *ansiReader) Read(p []byte) (int, error) {
|
| 97 | 97 |
|
| 98 | 98 |
copiedLength := copy(p, keyBytes) |
| 99 | 99 |
if copiedLength != len(keyBytes) {
|
| 100 |
- return 0, errors.New("Unexpected copy length encountered.")
|
|
| 100 |
+ return 0, errors.New("unexpected copy length encountered")
|
|
| 101 | 101 |
} |
| 102 | 102 |
|
| 103 | 103 |
logger.Debugf("Read p[%d]: % x", copiedLength, p)
|
| ... | ... |
@@ -753,7 +753,7 @@ func parseStorageOpts(storageOpts []string) (map[string]string, error) {
|
| 753 | 753 |
opt := strings.SplitN(option, "=", 2) |
| 754 | 754 |
m[opt[0]] = opt[1] |
| 755 | 755 |
} else {
|
| 756 |
- return nil, fmt.Errorf("Invalid storage option.")
|
|
| 756 |
+ return nil, fmt.Errorf("invalid storage option")
|
|
| 757 | 757 |
} |
| 758 | 758 |
} |
| 759 | 759 |
return m, nil |