Skip to content

Commit 3fbdea0

Browse files
authored
rename models to pkg (#2005)
1 parent 710ecf4 commit 3fbdea0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+196
-196
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ test: gotest
2828

2929
gotest:
3030
go test -v --cover ./assets/...
31-
go test -v --cover ./client/...
3231
go test -v --cover ./cmd/...
33-
go test -v --cover ./models/...
32+
go test -v --cover ./client/...
3433
go test -v --cover ./server/...
35-
go test -v --cover ./utils/...
34+
go test -v --cover ./pkg/...
3635

3736
ci:
3837
go test -count=1 -p=1 -v ./tests/...

client/admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"time"
2222

2323
"github.com/fatedier/frp/assets"
24-
frpNet "github.com/fatedier/frp/utils/net"
24+
frpNet "github.com/fatedier/frp/pkg/util/net"
2525

2626
"github.com/gorilla/mux"
2727
)

client/admin_api.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"strings"
2424

2525
"github.com/fatedier/frp/client/proxy"
26-
"github.com/fatedier/frp/models/config"
27-
"github.com/fatedier/frp/utils/log"
26+
"github.com/fatedier/frp/pkg/config"
27+
"github.com/fatedier/frp/pkg/util/log"
2828
)
2929

3030
type GeneralResponse struct {

client/control.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ import (
2525
"time"
2626

2727
"github.com/fatedier/frp/client/proxy"
28-
"github.com/fatedier/frp/models/auth"
29-
"github.com/fatedier/frp/models/config"
30-
"github.com/fatedier/frp/models/msg"
31-
"github.com/fatedier/frp/models/transport"
32-
frpNet "github.com/fatedier/frp/utils/net"
33-
"github.com/fatedier/frp/utils/xlog"
28+
"github.com/fatedier/frp/pkg/auth"
29+
"github.com/fatedier/frp/pkg/config"
30+
"github.com/fatedier/frp/pkg/msg"
31+
"github.com/fatedier/frp/pkg/transport"
32+
frpNet "github.com/fatedier/frp/pkg/util/net"
33+
"github.com/fatedier/frp/pkg/util/xlog"
3434

3535
"github.com/fatedier/golib/control/shutdown"
3636
"github.com/fatedier/golib/crypto"

client/event/event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package event
33
import (
44
"errors"
55

6-
"github.com/fatedier/frp/models/msg"
6+
"github.com/fatedier/frp/pkg/msg"
77
)
88

99
type Type int

client/health/health.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"net/http"
2525
"time"
2626

27-
"github.com/fatedier/frp/utils/xlog"
27+
"github.com/fatedier/frp/pkg/util/xlog"
2828
)
2929

3030
var (

client/proxy/proxy.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ import (
2626
"sync"
2727
"time"
2828

29-
"github.com/fatedier/frp/models/config"
30-
"github.com/fatedier/frp/models/msg"
31-
plugin "github.com/fatedier/frp/models/plugin/client"
32-
"github.com/fatedier/frp/models/proto/udp"
33-
"github.com/fatedier/frp/utils/limit"
34-
frpNet "github.com/fatedier/frp/utils/net"
35-
"github.com/fatedier/frp/utils/xlog"
29+
"github.com/fatedier/frp/pkg/config"
30+
"github.com/fatedier/frp/pkg/msg"
31+
plugin "github.com/fatedier/frp/pkg/plugin/client"
32+
"github.com/fatedier/frp/pkg/proto/udp"
33+
"github.com/fatedier/frp/pkg/util/limit"
34+
frpNet "github.com/fatedier/frp/pkg/util/net"
35+
"github.com/fatedier/frp/pkg/util/xlog"
3636

3737
"github.com/fatedier/golib/errors"
3838
frpIo "github.com/fatedier/golib/io"

client/proxy/proxy_manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"sync"
88

99
"github.com/fatedier/frp/client/event"
10-
"github.com/fatedier/frp/models/config"
11-
"github.com/fatedier/frp/models/msg"
12-
"github.com/fatedier/frp/utils/xlog"
10+
"github.com/fatedier/frp/pkg/config"
11+
"github.com/fatedier/frp/pkg/msg"
12+
"github.com/fatedier/frp/pkg/util/xlog"
1313

1414
"github.com/fatedier/golib/errors"
1515
)

client/proxy/proxy_wrapper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import (
1010

1111
"github.com/fatedier/frp/client/event"
1212
"github.com/fatedier/frp/client/health"
13-
"github.com/fatedier/frp/models/config"
14-
"github.com/fatedier/frp/models/msg"
15-
"github.com/fatedier/frp/utils/xlog"
13+
"github.com/fatedier/frp/pkg/config"
14+
"github.com/fatedier/frp/pkg/msg"
15+
"github.com/fatedier/frp/pkg/util/xlog"
1616

1717
"github.com/fatedier/golib/errors"
1818
)

client/service.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
"context"
1919
"crypto/tls"
2020
"fmt"
21-
"github.com/fatedier/frp/models/transport"
2221
"io/ioutil"
2322
"net"
2423
"runtime"
@@ -27,13 +26,14 @@ import (
2726
"time"
2827

2928
"github.com/fatedier/frp/assets"
30-
"github.com/fatedier/frp/models/auth"
31-
"github.com/fatedier/frp/models/config"
32-
"github.com/fatedier/frp/models/msg"
33-
"github.com/fatedier/frp/utils/log"
34-
frpNet "github.com/fatedier/frp/utils/net"
35-
"github.com/fatedier/frp/utils/version"
36-
"github.com/fatedier/frp/utils/xlog"
29+
"github.com/fatedier/frp/pkg/auth"
30+
"github.com/fatedier/frp/pkg/config"
31+
"github.com/fatedier/frp/pkg/msg"
32+
"github.com/fatedier/frp/pkg/transport"
33+
"github.com/fatedier/frp/pkg/util/log"
34+
frpNet "github.com/fatedier/frp/pkg/util/net"
35+
"github.com/fatedier/frp/pkg/util/version"
36+
"github.com/fatedier/frp/pkg/util/xlog"
3737

3838
fmux "github.com/hashicorp/yamux"
3939
)

0 commit comments

Comments
 (0)