From 07b568cb5342789839aabba0ee6d41e7275099e8 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Thu, 31 Mar 2016 10:53:21 -0700 Subject: [PATCH] pkg: cleanup some unused code Signed-off-by: Alexander Morozov --- pkg/authorization/response.go | 7 ++----- pkg/ioutils/scheduler.go | 6 ------ pkg/ioutils/scheduler_gccgo.go | 13 ------------- pkg/term/term.go | 2 -- pkg/term/term_windows.go | 5 +---- 5 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 pkg/ioutils/scheduler.go delete mode 100644 pkg/ioutils/scheduler_gccgo.go diff --git a/pkg/authorization/response.go b/pkg/authorization/response.go index 245a0ef7fd..e64fc81ad5 100644 --- a/pkg/authorization/response.go +++ b/pkg/authorization/response.go @@ -5,9 +5,10 @@ import ( "bytes" "encoding/json" "fmt" - "github.com/Sirupsen/logrus" "net" "net/http" + + "github.com/Sirupsen/logrus" ) // 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 { // The original response writer rw http.ResponseWriter - - r *http.Request - - status int // body holds the response body body []byte // header holds the response header diff --git a/pkg/ioutils/scheduler.go b/pkg/ioutils/scheduler.go deleted file mode 100644 index 3c88f29e35..0000000000 --- a/pkg/ioutils/scheduler.go +++ /dev/null @@ -1,6 +0,0 @@ -// +build !gccgo - -package ioutils - -func callSchedulerIfNecessary() { -} diff --git a/pkg/ioutils/scheduler_gccgo.go b/pkg/ioutils/scheduler_gccgo.go deleted file mode 100644 index c11d02b947..0000000000 --- a/pkg/ioutils/scheduler_gccgo.go +++ /dev/null @@ -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() -} diff --git a/pkg/term/term.go b/pkg/term/term.go index 11ed20937b..eaa03229a9 100644 --- a/pkg/term/term.go +++ b/pkg/term/term.go @@ -27,8 +27,6 @@ type State struct { type Winsize struct { Height uint16 Width uint16 - x uint16 - y uint16 } // StdStreams returns the standard streams (stdin, stdout, stedrr). diff --git a/pkg/term/term_windows.go b/pkg/term/term_windows.go index a02e681f44..659da4de9e 100644 --- a/pkg/term/term_windows.go +++ b/pkg/term/term_windows.go @@ -23,8 +23,6 @@ type State struct { type Winsize struct { Height uint16 Width uint16 - x uint16 - y uint16 } const ( @@ -194,8 +192,7 @@ func GetWinsize(fd uintptr) (*Winsize, error) { winsize := &Winsize{ Width: uint16(info.Window.Right - info.Window.Left + 1), Height: uint16(info.Window.Bottom - info.Window.Top + 1), - x: 0, - y: 0} + } return winsize, nil }