chore: pretty-print value
This commit is contained in:
parent
5e5c632ed1
commit
1a7690c15c
2 changed files with 4 additions and 1 deletions
2
go.mod
2
go.mod
|
|
@ -58,6 +58,7 @@ require (
|
|||
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
|
||||
github.com/koron/go-ssdp v0.0.3
|
||||
github.com/korylprince/ipnetgen v1.0.1
|
||||
github.com/kr/pretty v0.3.0
|
||||
github.com/libp2p/zeroconf/v2 v2.2.0
|
||||
github.com/lorenzodonini/ocpp-go v0.16.1-0.20230224180512-0195c3faf41a
|
||||
github.com/lunixbochs/struc v0.0.0-20200707160740-784aaebc1d40
|
||||
|
|
@ -144,6 +145,7 @@ require (
|
|||
github.com/jmespath/go-jmespath v0.4.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.15.15 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/leodido/go-urn v1.2.1 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
|
||||
"github.com/evcc-io/evcc/util"
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/kr/pretty"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -121,7 +122,7 @@ func kv(p util.Param) string {
|
|||
}
|
||||
|
||||
if p.Key == "" && val == "" {
|
||||
log.ERROR.Printf("invalid key/val for %+v %+v, please report to https://github.com/evcc-io/evcc/issues/6439", p, p.Val)
|
||||
log.ERROR.Printf("invalid key/val for %+v %# v, please report to https://github.com/evcc-io/evcc/issues/6439", p, pretty.Formatter(p.Val))
|
||||
return "\"foo\":\"bar\""
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue