fix: Fix typos
Fix typos in repo
This commit is contained in:
parent
2cd92e147e
commit
ad8060510a
2
main.go
2
main.go
|
@ -44,7 +44,7 @@ var (
|
|||
minimalMode = false
|
||||
averageLoad = false
|
||||
percpuLoad = false
|
||||
tempScale = w.Celcius
|
||||
tempScale = w.Celsius
|
||||
battery = false
|
||||
statusbar = false
|
||||
netInterface = w.NET_INTERFACE_ALL
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
type TempScale int
|
||||
|
||||
const (
|
||||
Celcius TempScale = 0
|
||||
Celsius TempScale = 0
|
||||
Fahrenheit = 1
|
||||
)
|
||||
|
||||
|
@ -90,7 +90,7 @@ func (self *TempWidget) Draw(buf *ui.Buffer) {
|
|||
ui.NewStyle(fg),
|
||||
image.Pt(self.Inner.Max.X-4, self.Inner.Min.Y+y),
|
||||
)
|
||||
case Celcius:
|
||||
case Celsius:
|
||||
buf.SetString(
|
||||
fmt.Sprintf("%3dC", self.Data[key]),
|
||||
ui.NewStyle(fg),
|
||||
|
|
|
@ -64,7 +64,7 @@ func (self *TempWidget) update() {
|
|||
switch self.TempScale {
|
||||
case Fahrenheit:
|
||||
self.Data[sensor.SensorKey] = utils.CelsiusToFahrenheit(int(sensor.Temperature))
|
||||
case Celcius:
|
||||
case Celsius:
|
||||
self.Data[sensor.SensorKey] = int(sensor.Temperature)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,13 +58,13 @@ func collectSensors() ([]sensorMeasurement, error) {
|
|||
func (self *TempWidget) update() {
|
||||
sensors, err := collectSensors()
|
||||
if err != nil {
|
||||
log.Printf("error recieved from gopsutil: %v", err)
|
||||
log.Printf("error received from gopsutil: %v", err)
|
||||
}
|
||||
for _, sensor := range sensors {
|
||||
switch self.TempScale {
|
||||
case Fahrenheit:
|
||||
self.Data[sensor.name] = utils.CelsiusToFahrenheit(int(sensor.temperature))
|
||||
case Celcius:
|
||||
case Celsius:
|
||||
self.Data[sensor.name] = int(sensor.temperature)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
func (self *TempWidget) update() {
|
||||
sensors, err := psHost.SensorsTemperatures()
|
||||
if err != nil {
|
||||
log.Printf("error recieved from gopsutil: %v", err)
|
||||
log.Printf("error received from gopsutil: %v", err)
|
||||
}
|
||||
for _, sensor := range sensors {
|
||||
// only sensors with input in their name are giving us live temp info
|
||||
|
@ -22,7 +22,7 @@ func (self *TempWidget) update() {
|
|||
switch self.TempScale {
|
||||
case Fahrenheit:
|
||||
self.Data[label] = utils.CelsiusToFahrenheit(int(sensor.Temperature))
|
||||
case Celcius:
|
||||
case Celsius:
|
||||
self.Data[label] = int(sensor.Temperature)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ func (self *TempWidget) getTemp(mib []C.int, mlen int, snsrdev *C.struct_sensord
|
|||
switch self.TempScale {
|
||||
case Fahrenheit:
|
||||
self.Data[key] = utils.CelsiusToFahrenheit(temp)
|
||||
case Celcius:
|
||||
case Celsius:
|
||||
self.Data[key] = temp
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ func (self *TempWidget) update() {
|
|||
switch self.TempScale {
|
||||
case Fahrenheit:
|
||||
self.Data[sensor.SensorKey] = utils.CelsiusToFahrenheit(int(sensor.Temperature))
|
||||
case Celcius:
|
||||
case Celsius:
|
||||
self.Data[sensor.SensorKey] = int(sensor.Temperature)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user