From ef59f67961abd70fcb5359ffd9aeeeef293799f8 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 25 Jul 2017 22:14:52 +0200 Subject: [PATCH] refactor --- proxy/blackhole/config.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proxy/blackhole/config.go b/proxy/blackhole/config.go index 837b997c..2c27a344 100644 --- a/proxy/blackhole/config.go +++ b/proxy/blackhole/config.go @@ -22,22 +22,22 @@ type ResponseConfig interface { } // WriteTo implements ResponseConfig.WriteTo(). -func (v *NoneResponse) WriteTo(buf.Writer) {} +func (*NoneResponse) WriteTo(buf.Writer) {} // WriteTo implements ResponseConfig.WriteTo(). -func (v *HTTPResponse) WriteTo(writer buf.Writer) { +func (*HTTPResponse) WriteTo(writer buf.Writer) { b := buf.NewLocal(512) b.AppendSupplier(serial.WriteString(http403response)) writer.Write(buf.NewMultiBufferValue(b)) } // GetInternalResponse converts response settings from proto to internal data structure. -func (v *Config) GetInternalResponse() (ResponseConfig, error) { - if v.GetResponse() == nil { +func (c *Config) GetInternalResponse() (ResponseConfig, error) { + if c.GetResponse() == nil { return new(NoneResponse), nil } - config, err := v.GetResponse().GetInstance() + config, err := c.GetResponse().GetInstance() if err != nil { return nil, err }