pull/525/head
Darien Raymond 2017-07-25 22:14:52 +02:00
parent 08a72b7eb6
commit ef59f67961
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 5 additions and 5 deletions

View File

@ -22,22 +22,22 @@ type ResponseConfig interface {
} }
// WriteTo implements ResponseConfig.WriteTo(). // WriteTo implements ResponseConfig.WriteTo().
func (v *NoneResponse) WriteTo(buf.Writer) {} func (*NoneResponse) WriteTo(buf.Writer) {}
// WriteTo implements ResponseConfig.WriteTo(). // WriteTo implements ResponseConfig.WriteTo().
func (v *HTTPResponse) WriteTo(writer buf.Writer) { func (*HTTPResponse) WriteTo(writer buf.Writer) {
b := buf.NewLocal(512) b := buf.NewLocal(512)
b.AppendSupplier(serial.WriteString(http403response)) b.AppendSupplier(serial.WriteString(http403response))
writer.Write(buf.NewMultiBufferValue(b)) writer.Write(buf.NewMultiBufferValue(b))
} }
// GetInternalResponse converts response settings from proto to internal data structure. // GetInternalResponse converts response settings from proto to internal data structure.
func (v *Config) GetInternalResponse() (ResponseConfig, error) { func (c *Config) GetInternalResponse() (ResponseConfig, error) {
if v.GetResponse() == nil { if c.GetResponse() == nil {
return new(NoneResponse), nil return new(NoneResponse), nil
} }
config, err := v.GetResponse().GetInstance() config, err := c.GetResponse().GetInstance()
if err != nil { if err != nil {
return nil, err return nil, err
} }