1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-01 06:55:25 -05:00

fix tun app lints

This commit is contained in:
Shelikhoo
2023-10-23 01:44:36 +01:00
parent e87af12bf8
commit 0ca849637d
10 changed files with 39 additions and 27 deletions

View File

@@ -1,10 +1,12 @@
package device
import (
"io"
"github.com/v2fly/v2ray-core/v5/common/errors"
"gvisor.dev/gvisor/pkg/buffer"
"gvisor.dev/gvisor/pkg/tcpip/stack"
"io"
)
func NewLinkWriterToWriter(writer stack.LinkWriter) io.Writer {
@@ -16,7 +18,6 @@ type linkWriterToWriter struct {
}
func (l linkWriterToWriter) Write(p []byte) (n int, err error) {
buffer := buffer.MakeWithData(p)
packetBufferPtr := stack.NewPacketBuffer(stack.PacketBufferOptions{
Payload: buffer,