Skip to content

Commit d5c758e

Browse files
authored
format code. (#81)
1 parent e5351c9 commit d5c758e

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

voltdbclient/node_conn.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@ type nodeConn struct {
7676

7777
// The maximum number of retries to reconnect to a disconeected node before
7878
// giving up.
79-
maxRetries int
80-
tlsConfig *tls.Config
79+
maxRetries int
80+
tlsConfig *tls.Config
8181
connectTimeout time.Duration
8282
}
8383

8484
func newNodeConnWithTimeout(ci string, duration time.Duration) *nodeConn {
8585
u, _ := parseURL(ci)
8686
return &nodeConn{
87-
connInfo: ci,
88-
Host: u.Host,
89-
bpCh: make(chan chan bool),
90-
closeCh: make(chan chan bool),
91-
drainCh: make(chan chan bool),
92-
responseCh: make(chan *bytes.Buffer, maxResponseBuffer),
93-
requests: &sync.Map{},
87+
connInfo: ci,
88+
Host: u.Host,
89+
bpCh: make(chan chan bool),
90+
closeCh: make(chan chan bool),
91+
drainCh: make(chan chan bool),
92+
responseCh: make(chan *bytes.Buffer, maxResponseBuffer),
93+
requests: &sync.Map{},
9494
connectTimeout: duration,
9595
}
9696
}
@@ -112,7 +112,7 @@ func newNodeTLSConn(ci string, insecureSkipVerify bool, tlsConfig *tls.Config, p
112112
drainCh: make(chan chan bool),
113113
responseCh: make(chan *bytes.Buffer, maxResponseBuffer),
114114
requests: &sync.Map{},
115-
connectTimeout: duration,
115+
connectTimeout: duration,
116116
}
117117
}
118118

voltdbclient/response.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ type ResponseStatus int8
114114

115115
// The available ResponseStatus codes
116116
const (
117-
Success ResponseStatus = 1
118-
UserAbort ResponseStatus = -1
119-
GracefulFailure ResponseStatus = -2
120-
UnexpectedFailure ResponseStatus = -3
121-
ConnectionLost ResponseStatus = -4
122-
ServerUnavailable ResponseStatus = -5
123-
ConnectionTimeout ResponseStatus = -6
124-
ResponseUnknown ResponseStatus = -7
125-
TXNRestart ResponseStatus = -8
126-
OperationalFailure ResponseStatus = -9
117+
Success ResponseStatus = 1
118+
UserAbort ResponseStatus = -1
119+
GracefulFailure ResponseStatus = -2
120+
UnexpectedFailure ResponseStatus = -3
121+
ConnectionLost ResponseStatus = -4
122+
ServerUnavailable ResponseStatus = -5
123+
ConnectionTimeout ResponseStatus = -6
124+
ResponseUnknown ResponseStatus = -7
125+
TXNRestart ResponseStatus = -8
126+
OperationalFailure ResponseStatus = -9
127127
// -10 to -12 are not in the client's perview
128128
UnsupportedDynamicChange ResponseStatus = -13
129129
UninitializedAppStatusCode ResponseStatus = -128

voltdbclient/rows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func (vr VoltRows) GetFloat(colIndex int16) (interface{}, error) {
297297
return nil, fmt.Errorf("Did not find at FLOAT column at index %d\n", colIndex)
298298
}
299299
f := bytesToFloat(bs)
300-
if f == -1.7E+308 {
300+
if f == -1.7e+308 {
301301
return nil, nil
302302
}
303303
return f, nil

voltdbclient/url.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func parseURL(src string) (*url.URL, error) {
3737
// this method is same with the code block of the url.Port() method. you can
3838
// find this metod inside the Port method of the url package.
3939
// this method is used inside the client package to support go versions <1.8
40-
func getPort(host string) string{
40+
func getPort(host string) string {
4141
index := strings.IndexByte(host, ':')
4242
if index == -1 {
4343
return ""

voltdbclient/url_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ func TestParseURL(t *testing.T) {
4949
}
5050
}
5151

52-
5352
func TestGetPort(t *testing.T) {
5453
sample := []struct {
5554
host, port string

0 commit comments

Comments
 (0)