Skip to content

Commit

Permalink
Update nvmetemp regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
zcalusic committed Jun 27, 2020
1 parent 2294844 commit 9220fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion disktemp.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func parseDiskTemp() {

scanner := bufio.NewScanner(stdout)
for scanner.Scan() {
re := regexp.MustCompile(`^temperature : (\d+) C$`)
re := regexp.MustCompile(`^temperature\s+: (\d+) C$`)
if m := re.FindStringSubmatch(scanner.Text()); m != nil {
temp, err := strconv.ParseFloat(m[1], 64)
if err != nil {
Expand Down

0 comments on commit 9220fb1

Please sign in to comment.