main.go 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (C) 2019 Nicola Murino
  2. //
  3. // This program is free software: you can redistribute it and/or modify
  4. // it under the terms of the GNU Affero General Public License as published
  5. // by the Free Software Foundation, version 3.
  6. //
  7. // This program is distributed in the hope that it will be useful,
  8. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. // GNU Affero General Public License for more details.
  11. //
  12. // You should have received a copy of the GNU Affero General Public License
  13. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. // Fully featured and highly configurable SFTP server with optional
  15. // FTP/S and WebDAV support.
  16. // For more details about features, installation, configuration and usage
  17. // please refer to the README inside the source tree:
  18. // https://github.com/drakkan/sftpgo/blob/main/README.md
  19. package main // import "github.com/drakkan/sftpgo"
  20. import (
  21. "fmt"
  22. "go.uber.org/automaxprocs/maxprocs"
  23. "github.com/drakkan/sftpgo/v2/internal/cmd"
  24. )
  25. func main() {
  26. if undo, err := maxprocs.Set(); err != nil {
  27. fmt.Printf("error setting max procs: %v\n", err)
  28. undo()
  29. }
  30. cmd.Execute()
  31. }