mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-25 14:34:22 +00:00
formatted code with gofmt
This commit is contained in:
parent
ae857c7a69
commit
27b7f28c42
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user