fix: Fix typos

Fix typos in repo
This commit is contained in:
HowJMay 2020-01-22 01:21:57 +08:00
parent 2cd92e147e
commit ad8060510a
7 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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),

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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)
}
}

View File

@ -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
}
}

View File

@ -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)
}
}