1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-24 05:09:09 -04:00

Chore: change module name (#677)

This commit is contained in:
Loyalsoldier
2021-02-17 04:31:50 +08:00
committed by GitHub
parent 0957442e01
commit f94dd11a8c
623 changed files with 2532 additions and 2404 deletions

View File

@@ -1,4 +1,4 @@
// Package buf provides a light-weight memory allocation mechanism.
package buf // import "v2ray.com/core/common/buf"
package buf
//go:generate go run v2ray.com/core/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

View File

@@ -3,7 +3,7 @@ package buf
import (
"io"
"v2ray.com/core/common/bytespool"
"github.com/v2fly/v2ray-core/v4/common/bytespool"
)
const (

View File

@@ -6,8 +6,9 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"v2ray.com/core/common"
. "v2ray.com/core/common/buf"
"github.com/v2fly/v2ray-core/v4/common"
. "github.com/v2fly/v2ray-core/v4/common/buf"
)
func TestBufferClear(t *testing.T) {

View File

@@ -4,8 +4,8 @@ import (
"io"
"time"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/signal"
"github.com/v2fly/v2ray-core/v4/common/errors"
"github.com/v2fly/v2ray-core/v4/common/signal"
)
type dataHandler func(MultiBuffer)

View File

@@ -7,9 +7,9 @@ import (
"github.com/golang/mock/gomock"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/errors"
"v2ray.com/core/testing/mocks"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/errors"
"github.com/v2fly/v2ray-core/v4/testing/mocks"
)
func TestReadError(t *testing.T) {

View File

@@ -1,6 +1,6 @@
package buf
import "v2ray.com/core/common/errors"
import "github.com/v2fly/v2ray-core/v4/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,9 +5,9 @@ import (
"io"
"testing"
. "v2ray.com/core/common/buf"
"v2ray.com/core/common/net"
"v2ray.com/core/testing/servers/tcp"
. "github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func TestWriterCreation(t *testing.T) {

View File

@@ -3,9 +3,9 @@ package buf
import (
"io"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/serial"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/errors"
"github.com/v2fly/v2ray-core/v4/common/serial"
)
// ReadAllToBytes reads all content from the reader into a byte array, until EOF.

View File

@@ -9,8 +9,9 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"v2ray.com/core/common"
. "v2ray.com/core/common/buf"
"github.com/v2fly/v2ray-core/v4/common"
. "github.com/v2fly/v2ray-core/v4/common/buf"
)
func TestMultiBufferRead(t *testing.T) {

View File

@@ -3,8 +3,8 @@ package buf
import (
"io"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/errors"
)
func readOneUDP(r io.Reader) (*Buffer, error) {

View File

@@ -6,9 +6,9 @@ import (
"strings"
"testing"
"v2ray.com/core/common"
. "v2ray.com/core/common/buf"
"v2ray.com/core/transport/pipe"
"github.com/v2fly/v2ray-core/v4/common"
. "github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/transport/pipe"
)
func TestBytesReaderWriteTo(t *testing.T) {

View File

@@ -7,7 +7,7 @@ import (
"runtime"
"syscall"
"v2ray.com/core/common/platform"
"github.com/v2fly/v2ray-core/v4/common/platform"
)
type allocStrategy struct {

View File

@@ -8,11 +8,11 @@ import (
"testing"
"github.com/google/go-cmp/cmp"
"golang.org/x/sync/errgroup"
"v2ray.com/core/common"
. "v2ray.com/core/common/buf"
"v2ray.com/core/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/common"
. "github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func TestReadvReader(t *testing.T) {

View File

@@ -5,8 +5,8 @@ import (
"net"
"sync"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/errors"
)
// BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer.

View File

@@ -9,9 +9,9 @@ import (
"github.com/google/go-cmp/cmp"
"v2ray.com/core/common"
. "v2ray.com/core/common/buf"
"v2ray.com/core/transport/pipe"
"github.com/v2fly/v2ray-core/v4/common"
. "github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/transport/pipe"
)
func TestWriter(t *testing.T) {