formatted code with gofmt

This commit is contained in:
Bernhard B 2021-09-11 22:30:56 +02:00
parent ae857c7a69
commit 27b7f28c42
2 changed files with 22 additions and 24 deletions

View File

@ -1,12 +1,12 @@
package client
import (
"bufio"
"encoding/json"
"errors"
"net"
"bufio"
uuid "github.com/gofrs/uuid"
log "github.com/sirupsen/logrus"
"net"
)
type JsonRpc2Client struct {
@ -14,8 +14,7 @@ type JsonRpc2Client struct {
}
func NewJsonRpc2Client() *JsonRpc2Client {
return &JsonRpc2Client{
}
return &JsonRpc2Client{}
}
func (r *JsonRpc2Client) Dial(address string) error {

View File

@ -1,9 +1,9 @@
package utils
import (
"io/ioutil"
"errors"
"gopkg.in/yaml.v2"
"io/ioutil"
)
type ConfigEntry struct {
@ -20,8 +20,7 @@ type JsonRpc2ClientConfig struct {
}
func NewJsonRpc2ClientConfig() *JsonRpc2ClientConfig {
return &JsonRpc2ClientConfig{
}
return &JsonRpc2ClientConfig{}
}
func (c *JsonRpc2ClientConfig) Load(path string) error {
@ -43,7 +42,7 @@ func (c *JsonRpc2ClientConfig) GetTcpPortForNumber(number string) (int64, error)
return val.TcpPort, nil
}
return 0, errors.New("No number found")
return 0, errors.New("Number " + number + " not found in local map")
}
func (c *JsonRpc2ClientConfig) GetFifoPathnameForNumber(number string) (string, error) {
@ -51,7 +50,7 @@ func (c *JsonRpc2ClientConfig) GetFifoPathnameForNumber(number string) (string,
return val.FifoPathname, nil
}
return "", errors.New("No number found")
return "", errors.New("Number " + number + " not found in local map")
}
func (c *JsonRpc2ClientConfig) GetTcpPortsForNumbers() map[string]int64 {