@@ -4,15 +4,6 @@ kind: pipeline
|
|||||||
type: docker
|
type: docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: go-build
|
|
||||||
image: golang:1.17
|
|
||||||
commands:
|
|
||||||
- go test -v ./...
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
|
|
||||||
- name: go-test
|
- name: go-test
|
||||||
image: golang:1.17
|
image: golang:1.17
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ func WriteDeviceStateTable(w io.Writer, devices []models.Device) {
|
|||||||
|
|
||||||
temperatureString := ""
|
temperatureString := ""
|
||||||
if v.HasCapability(models.DCTemperatureControl, models.DCTemperatureSensor) {
|
if v.HasCapability(models.DCTemperatureControl, models.DCTemperatureSensor) {
|
||||||
temperatureString = strconv.FormatFloat(v.State.Temperature, 'f', -1, 64)
|
temperatureString = fmt.Sprintf("%d", v.State.Temperature)
|
||||||
}
|
}
|
||||||
|
|
||||||
intensityString := ""
|
intensityString := ""
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"crypto/rand"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
buf := make([]byte, 8)
|
|
||||||
_, _ = io.ReadFull(rand.Reader, buf)
|
|
||||||
|
|
||||||
fmt.Printf("%x", buf)
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user