浏览代码

Merge pull request #28698 from YuPengZTE/devErrot

error strings should not be capitalized or end with punctuation
Sebastiaan van Stijn 8 年之前
父节点
当前提交
86eae4018a
共有 3 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      pkg/system/meminfo_solaris.go
  2. 1 1
      pkg/term/windows/ansi_reader.go
  3. 1 1
      runconfig/opts/parse.go

+ 1 - 1
pkg/system/meminfo_solaris.go

@@ -89,7 +89,7 @@ func ReadMemInfo() (*MemInfo, error) {
 
 
 	if ppKernel < 0 || MemTotal < 0 || MemFree < 0 || SwapTotal < 0 ||
 	if ppKernel < 0 || MemTotal < 0 || MemFree < 0 || SwapTotal < 0 ||
 		SwapFree < 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{}
 	meminfo := &MemInfo{}

+ 1 - 1
pkg/term/windows/ansi_reader.go

@@ -97,7 +97,7 @@ func (ar *ansiReader) Read(p []byte) (int, error) {
 
 
 	copiedLength := copy(p, keyBytes)
 	copiedLength := copy(p, keyBytes)
 	if copiedLength != len(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)
 	logger.Debugf("Read        p[%d]: % x", copiedLength, p)

+ 1 - 1
runconfig/opts/parse.go

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