Skip to content

Commit

Permalink
opt: move logging module into internal package
Browse files Browse the repository at this point in the history
Avoid exposing some unwanted variables and methods to users.
  • Loading branch information
panjf2000 committed Jul 5, 2020
1 parent 2a7977f commit 00af504
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"sync/atomic"
"time"

"github.com/panjf2000/gnet/logging"
"github.com/panjf2000/gnet/internal/logging"
)

// Action is an action that occurs after the completion of an event.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/netpoll/epoll.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"unsafe"

"github.com/panjf2000/gnet/internal"
"github.com/panjf2000/gnet/logging"
"github.com/panjf2000/gnet/internal/logging"
"golang.org/x/sys/unix"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/netpoll/kqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"os"

"github.com/panjf2000/gnet/internal"
"github.com/panjf2000/gnet/logging"
"github.com/panjf2000/gnet/internal/logging"
"golang.org/x/sys/unix"
)

Expand Down
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package gnet
import (
"time"

"github.com/panjf2000/gnet/logging"
"github.com/panjf2000/gnet/internal/logging"
)

// Option is a function that will set up option.
Expand Down
2 changes: 1 addition & 1 deletion server_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
"time"

"github.com/panjf2000/gnet/errors"
"github.com/panjf2000/gnet/internal/logging"
"github.com/panjf2000/gnet/internal/netpoll"
"github.com/panjf2000/gnet/logging"
)

type server struct {
Expand Down
2 changes: 1 addition & 1 deletion server_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"time"

errors2 "github.com/panjf2000/gnet/errors"
"github.com/panjf2000/gnet/logging"
"github.com/panjf2000/gnet/internal/logging"
)

// commandBufferSize represents the buffer size of event-loop command channel on Windows.
Expand Down

0 comments on commit 00af504

Please sign in to comment.