잘못된 import 수정
This commit is contained in:
parent
a50b3d42f3
commit
ff77d2b7d1
|
@ -2,16 +2,17 @@ package rotater
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
"amuz.es/src/infra/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type LockedWriteSyncer struct {
|
type LockedWriteSyncer struct {
|
||||||
sync.Mutex
|
sync.Mutex
|
||||||
ws WriteSyncer
|
ws logger.WriteSyncer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lock wraps a WriteSyncer in a mutex to make it safe for concurrent use. In
|
// Lock wraps a WriteSyncer in a mutex to make it safe for concurrent use. In
|
||||||
// particular, *os.Files must be locked before use.
|
// particular, *os.Files must be locked before use.
|
||||||
func newLocked(ws WriteSyncer) RotateSyncer {
|
func newLocked(ws logger.WriteSyncer) logger.RotateSyncer {
|
||||||
if lws, ok := ws.(*LockedWriteSyncer); ok {
|
if lws, ok := ws.(*LockedWriteSyncer); ok {
|
||||||
// no need to layer on another lock
|
// no need to layer on another lock
|
||||||
return lws
|
return lws
|
||||||
|
@ -33,6 +34,6 @@ func (s *LockedWriteSyncer) Sync() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *LockedWriteSyncer) SetOnClose(closeFunc CloseFunc) {}
|
func (r *LockedWriteSyncer) SetOnClose(closeFunc logger.CloseFunc) {}
|
||||||
func (r *LockedWriteSyncer) Rotate() (err error) { return }
|
func (r *LockedWriteSyncer) Rotate() (err error) { return }
|
||||||
func (r *LockedWriteSyncer) Close() (err error) { return }
|
func (r *LockedWriteSyncer) Close() (err error) { return }
|
||||||
|
|
Loading…
Reference in New Issue