Browse code

pkg: cleanup some unused code

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2016/04/01 02:53:21
Showing 5 changed files
... ...
@@ -5,9 +5,10 @@ import (
5 5
 	"bytes"
6 6
 	"encoding/json"
7 7
 	"fmt"
8
-	"github.com/Sirupsen/logrus"
9 8
 	"net"
10 9
 	"net/http"
10
+
11
+	"github.com/Sirupsen/logrus"
11 12
 )
12 13
 
13 14
 // ResponseModifier allows authorization plugins to read and modify the content of the http.response
... ...
@@ -51,10 +52,6 @@ func NewResponseModifier(rw http.ResponseWriter) ResponseModifier {
51 51
 type responseModifier struct {
52 52
 	// The original response writer
53 53
 	rw http.ResponseWriter
54
-
55
-	r *http.Request
56
-
57
-	status int
58 54
 	// body holds the response body
59 55
 	body []byte
60 56
 	// header holds the response header
61 57
deleted file mode 100644
... ...
@@ -1,6 +0,0 @@
1
-// +build !gccgo
2
-
3
-package ioutils
4
-
5
-func callSchedulerIfNecessary() {
6
-}
7 1
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-// +build gccgo
2
-
3
-package ioutils
4
-
5
-import (
6
-	"runtime"
7
-)
8
-
9
-func callSchedulerIfNecessary() {
10
-	//allow or force Go scheduler to switch context, without explicitly
11
-	//forcing this will make it hang when using gccgo implementation
12
-	runtime.Gosched()
13
-}
... ...
@@ -27,8 +27,6 @@ type State struct {
27 27
 type Winsize struct {
28 28
 	Height uint16
29 29
 	Width  uint16
30
-	x      uint16
31
-	y      uint16
32 30
 }
33 31
 
34 32
 // StdStreams returns the standard streams (stdin, stdout, stedrr).
... ...
@@ -23,8 +23,6 @@ type State struct {
23 23
 type Winsize struct {
24 24
 	Height uint16
25 25
 	Width  uint16
26
-	x      uint16
27
-	y      uint16
28 26
 }
29 27
 
30 28
 const (
... ...
@@ -194,8 +192,7 @@ func GetWinsize(fd uintptr) (*Winsize, error) {
194 194
 	winsize := &Winsize{
195 195
 		Width:  uint16(info.Window.Right - info.Window.Left + 1),
196 196
 		Height: uint16(info.Window.Bottom - info.Window.Top + 1),
197
-		x:      0,
198
-		y:      0}
197
+	}
199 198
 
200 199
 	return winsize, nil
201 200
 }