Xiang Li 12 years ago
parent
commit
00d2d6eb4e
2 changed files with 6 additions and 6 deletions
  1. 2 2
      etcd.go
  2. 4 4
      transporter.go

+ 2 - 2
etcd.go

@@ -90,9 +90,9 @@ const (
 const (
 const (
 	ELECTIONTIMTOUT  = 200 * time.Millisecond
 	ELECTIONTIMTOUT  = 200 * time.Millisecond
 	HEARTBEATTIMEOUT = 50 * time.Millisecond
 	HEARTBEATTIMEOUT = 50 * time.Millisecond
-	
+
 	// Timeout for internal raft http connection
 	// Timeout for internal raft http connection
-	// The original timeout for http is 45 seconds 
+	// The original timeout for http is 45 seconds
 	// which is too long for our usage.
 	// which is too long for our usage.
 	HTTPTIMEOUT = time.Second
 	HTTPTIMEOUT = time.Second
 )
 )

+ 4 - 4
transporter.go

@@ -102,12 +102,12 @@ func (t transporter) GetLeaderClientAddress() string {
 
 
 // Send server side POST request
 // Send server side POST request
 func (t transporter) Post(path string, body io.Reader) (*http.Response, error) {
 func (t transporter) Post(path string, body io.Reader) (*http.Response, error) {
-		resp, err := t.client.Post(t.scheme + path, "application/json", body)
-		return resp, err
+	resp, err := t.client.Post(t.scheme+path, "application/json", body)
+	return resp, err
 }
 }
 
 
 // Send server side GET request
 // Send server side GET request
 func (t transporter) Get(path string) (*http.Response, error) {
 func (t transporter) Get(path string) (*http.Response, error) {
-		resp, err := t.client.Get(t.scheme + path)
-		return resp, err
+	resp, err := t.client.Get(t.scheme + path)
+	return resp, err
 }
 }