1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-26 20:16:55 -05:00

fix lint warnings

This commit is contained in:
Darien Raymond 2017-10-23 17:39:15 +02:00
parent 94bba49674
commit e06e3db50a
2 changed files with 4 additions and 3 deletions

View File

@ -29,8 +29,8 @@ func New(ctx context.Context, config *Config) (*Handler, error) {
} }
// Process implements OutboundHandler.Dispatch(). // Process implements OutboundHandler.Dispatch().
func (v *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dialer proxy.Dialer) error { func (h *Handler) Process(ctx context.Context, outboundRay ray.OutboundRay, dialer proxy.Dialer) error {
v.response.WriteTo(outboundRay.OutboundOutput()) h.response.WriteTo(outboundRay.OutboundOutput())
// Sleep a little here to make sure the response is sent to client. // Sleep a little here to make sure the response is sent to client.
time.Sleep(time.Second) time.Sleep(time.Second)
outboundRay.OutboundOutput().CloseError() outboundRay.OutboundOutput().CloseError()

View File

@ -1,6 +1,7 @@
package blackhole package blackhole
import ( import (
"v2ray.com/core/common"
"v2ray.com/core/common/buf" "v2ray.com/core/common/buf"
"v2ray.com/core/common/serial" "v2ray.com/core/common/serial"
) )
@ -27,7 +28,7 @@ func (*NoneResponse) WriteTo(buf.Writer) {}
// WriteTo implements ResponseConfig.WriteTo(). // WriteTo implements ResponseConfig.WriteTo().
func (*HTTPResponse) WriteTo(writer buf.Writer) { func (*HTTPResponse) WriteTo(writer buf.Writer) {
b := buf.NewLocal(512) b := buf.NewLocal(512)
b.AppendSupplier(serial.WriteString(http403response)) common.Must(b.AppendSupplier(serial.WriteString(http403response)))
writer.Write(buf.NewMultiBufferValue(b)) writer.Write(buf.NewMultiBufferValue(b))
} }