1
0
Fork 0

잘못된 import 수정

This commit is contained in:
Sangbum Kim 2017-11-08 01:44:20 +09:00
parent a50b3d42f3
commit ff77d2b7d1
1 changed files with 4 additions and 3 deletions

View File

@ -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 }