pkg: cleanup some unused code
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
d70faf86e8
commit
dfeb86d734
5 changed files with 3 additions and 30 deletions
|
@ -5,9 +5,10 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/Sirupsen/logrus"
|
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/Sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ResponseModifier allows authorization plugins to read and modify the content of the http.response
|
// ResponseModifier allows authorization plugins to read and modify the content of the http.response
|
||||||
|
@ -51,10 +52,6 @@ func NewResponseModifier(rw http.ResponseWriter) ResponseModifier {
|
||||||
type responseModifier struct {
|
type responseModifier struct {
|
||||||
// The original response writer
|
// The original response writer
|
||||||
rw http.ResponseWriter
|
rw http.ResponseWriter
|
||||||
|
|
||||||
r *http.Request
|
|
||||||
|
|
||||||
status int
|
|
||||||
// body holds the response body
|
// body holds the response body
|
||||||
body []byte
|
body []byte
|
||||||
// header holds the response header
|
// header holds the response header
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
// +build !gccgo
|
|
||||||
|
|
||||||
package ioutils
|
|
||||||
|
|
||||||
func callSchedulerIfNecessary() {
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
// +build gccgo
|
|
||||||
|
|
||||||
package ioutils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"runtime"
|
|
||||||
)
|
|
||||||
|
|
||||||
func callSchedulerIfNecessary() {
|
|
||||||
//allow or force Go scheduler to switch context, without explicitly
|
|
||||||
//forcing this will make it hang when using gccgo implementation
|
|
||||||
runtime.Gosched()
|
|
||||||
}
|
|
|
@ -27,8 +27,6 @@ type State struct {
|
||||||
type Winsize struct {
|
type Winsize struct {
|
||||||
Height uint16
|
Height uint16
|
||||||
Width uint16
|
Width uint16
|
||||||
x uint16
|
|
||||||
y uint16
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StdStreams returns the standard streams (stdin, stdout, stedrr).
|
// StdStreams returns the standard streams (stdin, stdout, stedrr).
|
||||||
|
|
|
@ -23,8 +23,6 @@ type State struct {
|
||||||
type Winsize struct {
|
type Winsize struct {
|
||||||
Height uint16
|
Height uint16
|
||||||
Width uint16
|
Width uint16
|
||||||
x uint16
|
|
||||||
y uint16
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -194,8 +192,7 @@ func GetWinsize(fd uintptr) (*Winsize, error) {
|
||||||
winsize := &Winsize{
|
winsize := &Winsize{
|
||||||
Width: uint16(info.Window.Right - info.Window.Left + 1),
|
Width: uint16(info.Window.Right - info.Window.Left + 1),
|
||||||
Height: uint16(info.Window.Bottom - info.Window.Top + 1),
|
Height: uint16(info.Window.Bottom - info.Window.Top + 1),
|
||||||
x: 0,
|
}
|
||||||
y: 0}
|
|
||||||
|
|
||||||
return winsize, nil
|
return winsize, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue