mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-22 07:30:25 +00:00
daac90c4e1
hooks doing something like this: err = provider.updateUser(u) ... return provider.userExists(username) could be racy if another update happen before provider.userExists(username) also pass a pointer to updateUser so if the user is modified inside "validateUser" we can just return the modified user without do a new query
22 lines
567 B
Go
22 lines
567 B
Go
// Fully featured and highly configurable SFTP server with optional
|
|
// FTP/S and WebDAV support.
|
|
// For more details about features, installation, configuration and usage
|
|
// please refer to the README inside the source tree:
|
|
// https://github.com/drakkan/sftpgo/blob/master/README.md
|
|
package main // import "github.com/drakkan/sftpgo"
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"go.uber.org/automaxprocs/maxprocs"
|
|
|
|
"github.com/drakkan/sftpgo/cmd"
|
|
)
|
|
|
|
func main() {
|
|
if undo, err := maxprocs.Set(); err != nil {
|
|
fmt.Printf("error setting max procs: %v\n", err)
|
|
undo()
|
|
}
|
|
cmd.Execute()
|
|
}
|