mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
refactoring: add common package
The common package defines the interfaces that a protocol must implement and contain code that can be shared among supported protocols. This way should be easier to support new protocols
This commit is contained in:
@@ -6,12 +6,12 @@ import (
|
||||
)
|
||||
|
||||
type logSyncWrapper struct {
|
||||
lock *sync.Mutex
|
||||
sync.Mutex
|
||||
output *os.File
|
||||
}
|
||||
|
||||
func (l logSyncWrapper) Write(b []byte) (n int, err error) {
|
||||
l.lock.Lock()
|
||||
defer l.lock.Unlock()
|
||||
func (l *logSyncWrapper) Write(b []byte) (n int, err error) {
|
||||
l.Lock()
|
||||
defer l.Unlock()
|
||||
return l.output.Write(b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user