We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76ea9de commit cb8d660Copy full SHA for cb8d660
cpuinfo.go
@@ -386,7 +386,7 @@ func parseCPUInfoLoong(info []byte) ([]CPUInfo, error) {
386
// find the first "processor" line
387
firstLine := firstNonEmptyLine(scanner)
388
if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") {
389
- return nil, errors.New("invalid cpuinfo file: " + firstLine)
+ return nil, fmt.Errorf("%w: %q", ErrFileParse, firstLine)
390
}
391
field := strings.SplitN(firstLine, ": ", 2)
392
cpuinfo := []CPUInfo{}
0 commit comments