Removes unuseful stub code
This commit is contained in:
15
logger.go
15
logger.go
@@ -23,21 +23,6 @@ func NewLogger() *Logger {
|
|||||||
return &Logger{log.New(os.Stdout, "[narco] ", log.LstdFlags)}
|
return &Logger{log.New(os.Stdout, "[narco] ", log.LstdFlags)}
|
||||||
}
|
}
|
||||||
|
|
||||||
type FooResponseWriter struct {
|
|
||||||
header http.Header
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *FooResponseWriter) Header() http.Header {
|
|
||||||
return f.header
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *FooResponseWriter) WriteHeader(status int) {
|
|
||||||
}
|
|
||||||
|
|
||||||
func (f *FooResponseWriter) Write(b []byte) (int, error) {
|
|
||||||
return len(b), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l *Logger) Wrap() func(chain.Handler) chain.Handler {
|
func (l *Logger) Wrap() func(chain.Handler) chain.Handler {
|
||||||
return func(other chain.Handler) chain.Handler {
|
return func(other chain.Handler) chain.Handler {
|
||||||
return chain.HandlerFunc(func(ctx context.Context, h http.ResponseWriter, r *http.Request) {
|
return chain.HandlerFunc(func(ctx context.Context, h http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Reference in New Issue
Block a user