minor cleanup of formatting
This commit is contained in:
+3
-3
@@ -23,7 +23,7 @@ func RenderTemperatureSensors(console *strings.Builder, proc *proc.Proc) {
|
||||
tempC := sensor.TempC
|
||||
tempF := (tempC * 9 / 5) + 32
|
||||
// \033[K clears from cursor to end of line (prevents lingering chars)
|
||||
fmt.Fprintf(console, "Sensor: %-25s | %5.1f °C (%5.1f °F)\033[K\n", sensor.Name, tempC, tempF)
|
||||
fmt.Fprintf(console, "%-16s | %.3f °C (%.3f °F)\033[K\n", sensor.Name, tempC, tempF)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ func RenderPowerSensors(console *strings.Builder, proc *proc.Proc) {
|
||||
power, _ := proc.SensorReader.ReadPowerSensors()
|
||||
for _, sensor := range power {
|
||||
// \033[K clears from cursor to end of line (prevents lingering chars)
|
||||
fmt.Fprintf(console, "Sensor: %-25s | %5.1f W\033[K\n", sensor.Name, sensor.Watts)
|
||||
fmt.Fprintf(console, "%-16s | %.3f W\033[K\n", sensor.Name, sensor.Watts)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ func RenderClockSensors(console *strings.Builder, proc *proc.Proc) {
|
||||
power, _ := proc.SensorReader.ReadClockSensors()
|
||||
for _, sensor := range power {
|
||||
// \033[K clears from cursor to end of line (prevents lingering chars)
|
||||
fmt.Fprintf(console, "Sensor: %-25d | %5.1f GHz\033[K\n", sensor.Name, sensor.FrequencyGHz)
|
||||
fmt.Fprintf(console, "%-16s | %.3f GHz\033[K\n", sensor.Name, sensor.FrequencyGHz)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user