[vz-users] Influx Performance

Sirko mail_ist at nurfuerspam.de
Fri Nov 8 12:28:39 CET 2019


Hi,

ich wollte Gravo mal testen, aber beim make erhalte ich diese Fehler:

pi at raspberrypi ~/gravo $ make
rm -rf dist/ cover.out
golangci-lint run
grafana/model.go:99:2: return statements should not be cuddled if block
has more than two lines (wsl)
         return json.Marshal(a)
         ^
volkszaehler/client.go:51:2: assignments should only be cuddled with
other assignments (wsl)
         resp.Body = ioutil.NopCloser(bytes.NewBuffer(body))
         ^
volkszaehler/client.go:53:2: return statements should not be cuddled if
block has more than two lines (wsl)
         return nil
         ^
volkszaehler/client.go:63:2: only one cuddle assignment allowed before
if statement (wsl)
         if err != nil {
         ^
volkszaehler/client.go:66:2: expressions should not be cuddled with
blocks (wsl)
         req.Header.Add("Accept", "application/json")
         ^
volkszaehler/client.go:94:2: expressions should not be cuddled with
blocks (wsl)
         req.Header.Add("Content-type", "application/json")
         ^
volkszaehler/client.go:117:2: only one cuddle assignment allowed before
defer statement (wsl)
         defer func() {
         ^
volkszaehler/client.go:138:2: only one cuddle assignment allowed before
if statement (wsl)
         if err != nil {
         ^
volkszaehler/client.go:141:2: only one cuddle assignment allowed before
defer statement (wsl)
         defer func() {
         ^
volkszaehler/client.go:181:2: only one cuddle assignment allowed before
defer statement (wsl)
         defer func() {
         ^
server.go:50:3: return statements should not be cuddled if block has
more than two lines (wsl)
                 return
                 ^
server.go:213:2: expressions should not be cuddled with blocks (wsl)
         wg.Wait()
         ^
server.go:228:2: if statements should only be cuddled with assignments (wsl)
         if target.Data.Options != "" {
         ^
Makefile:15: recipe for target 'checks' failed
make: *** [checks] Error 1


Wie krieg ich das zum Laufen?

Grüße
Sirko

Mein bevorzugter Ansatz für Volkszähler mit Grafana ist derzeit:
> ...
> - https://github.com/andig/gravo als Adapter für Volkszähler
> - https://github.com/simPod/grafana-json-datasource als JSON
> Datasource für Grafana
> ...
> Viele Grüße,
> Andreas
>


More information about the volkszaehler-users mailing list