refactor: 修改module名称适应私有仓库

main v0.1.0
NorthLan 3 years ago
parent cc68630e25
commit bac4f410ad

@ -2,11 +2,11 @@ package cluster
import (
"context"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/mock"
"git.noahlan.cn/northlan/ngs/session"
"net"
"ngs/cluster/clusterpb"
"ngs/internal/message"
"ngs/mock"
"ngs/session"
)
type acceptor struct {

@ -3,15 +3,15 @@ package cluster
import (
"errors"
"fmt"
"git.noahlan.cn/northlan/ngs/internal/codec"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/internal/packet"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/scheduler"
"git.noahlan.cn/northlan/ngs/session"
"net"
"ngs/internal/codec"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/internal/packet"
"ngs/pipeline"
"ngs/scheduler"
"ngs/session"
"reflect"
"sync/atomic"
"time"

@ -3,8 +3,8 @@ package cluster
import (
"context"
"fmt"
"ngs/cluster/clusterpb"
"ngs/internal/log"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/internal/log"
"sync"
)

@ -3,8 +3,8 @@ package cluster
import (
"context"
"errors"
"git.noahlan.cn/northlan/ngs/internal/env"
"google.golang.org/grpc"
"ngs/internal/env"
"sync"
"sync/atomic"
"time"

@ -4,19 +4,19 @@ import (
"context"
"encoding/json"
"fmt"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/codec"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/internal/packet"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/scheduler"
"git.noahlan.cn/northlan/ngs/session"
"github.com/gorilla/websocket"
"math/rand"
"net"
"ngs/cluster/clusterpb"
"ngs/component"
"ngs/internal/codec"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/internal/packet"
"ngs/pipeline"
"ngs/scheduler"
"ngs/session"
"reflect"
"sort"
"strings"

@ -1,6 +1,6 @@
package cluster
import "ngs/cluster/clusterpb"
import "git.noahlan.cn/northlan/ngs/cluster/clusterpb"
type Member struct {
isMaster bool

@ -4,18 +4,18 @@ import (
"context"
"errors"
"fmt"
"git.noahlan.cn/northlan/ngs/cluster/clusterpb"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/scheduler"
"git.noahlan.cn/northlan/ngs/session"
"github.com/gorilla/websocket"
"google.golang.org/grpc"
"net"
"net/http"
"ngs/cluster/clusterpb"
"ngs/component"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/pipeline"
"ngs/scheduler"
"ngs/session"
"strings"
"sync"
"time"

@ -1,4 +1,4 @@
module ngs
module git.noahlan.cn/northlan/ngs
go 1.18

@ -2,10 +2,10 @@ package ngs
import (
"fmt"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/session"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/session"
"sync"
"sync/atomic"
)

@ -1,8 +1,8 @@
package ngs
import (
"git.noahlan.cn/northlan/ngs/session"
"math/rand"
"ngs/session"
"testing"
)

@ -2,12 +2,12 @@ package ngs
import (
"fmt"
"ngs/cluster"
"ngs/component"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/runtime"
"ngs/scheduler"
"git.noahlan.cn/northlan/ngs/cluster"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/runtime"
"git.noahlan.cn/northlan/ngs/scheduler"
"os"
"os/signal"
"path/filepath"

@ -3,7 +3,7 @@ package codec
import (
"bytes"
"errors"
"ngs/internal/packet"
"git.noahlan.cn/northlan/ngs/internal/packet"
)
// Codec constants.

@ -1,7 +1,7 @@
package codec
import (
. "ngs/internal/packet"
. "git.noahlan.cn/northlan/ngs/internal/packet"
"reflect"
"testing"
)

@ -1,11 +1,11 @@
package env
import (
"git.noahlan.cn/northlan/ngs/serialize"
"git.noahlan.cn/northlan/ngs/serialize/protobuf"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"net/http"
"ngs/serialize"
"ngs/serialize/protobuf"
"time"
)

@ -4,7 +4,7 @@ import (
"encoding/binary"
"errors"
"fmt"
"ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/log"
"strings"
)

@ -1,6 +1,6 @@
package message
import "ngs/internal/env"
import "git.noahlan.cn/northlan/ngs/internal/env"
func Serialize(v interface{}) ([]byte, error) {
if data, ok := v.([]byte); ok {

@ -1,5 +1,5 @@
package runtime
import "ngs/cluster"
import "git.noahlan.cn/northlan/ngs/cluster"
var CurrentNode *cluster.Node

@ -1,15 +1,15 @@
package ngs
import (
"git.noahlan.cn/northlan/ngs/cluster"
"git.noahlan.cn/northlan/ngs/component"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/pipeline"
"git.noahlan.cn/northlan/ngs/serialize"
"google.golang.org/grpc"
"net/http"
"ngs/cluster"
"ngs/component"
"ngs/internal/env"
"ngs/internal/log"
"ngs/internal/message"
"ngs/pipeline"
"ngs/serialize"
"time"
)

@ -1,8 +1,8 @@
package pipeline
import (
"ngs/internal/message"
"ngs/session"
"git.noahlan.cn/northlan/ngs/internal/message"
"git.noahlan.cn/northlan/ngs/session"
"sync"
)

@ -2,8 +2,8 @@ package scheduler
import (
"fmt"
"ngs/internal/env"
"ngs/internal/log"
"git.noahlan.cn/northlan/ngs/internal/env"
"git.noahlan.cn/northlan/ngs/internal/log"
"runtime/debug"
"sync/atomic"
"time"

@ -2,8 +2,8 @@ package scheduler
import (
"fmt"
"git.noahlan.cn/northlan/ngs/internal/log"
"math"
"ngs/internal/log"
"runtime/debug"
"sync"
"sync/atomic"

@ -2,7 +2,7 @@ package json
import (
"encoding/json"
"ngs/serialize"
"git.noahlan.cn/northlan/ngs/serialize"
)
// Serializer implements the serialize.Serializer interface

@ -2,8 +2,8 @@ package protobuf
import (
"errors"
"git.noahlan.cn/northlan/ngs/serialize"
"google.golang.org/protobuf/proto"
"ngs/serialize"
)
// ErrWrongValueType is the error used for marshal the value with protobuf encoding.

@ -1,8 +1,8 @@
package protobuf
import (
"git.noahlan.cn/northlan/ngs/benchmark/testdata"
"google.golang.org/protobuf/proto"
"ngs/benchmark/testdata"
"testing"
)

@ -2,8 +2,8 @@ package session
import (
"errors"
"git.noahlan.cn/northlan/ngs/service"
"net"
"ngs/service"
"sync"
"sync/atomic"
"time"

Loading…
Cancel
Save