mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
adjust runtime.GOMAXPROCS to match the container CPU quota, if any
This commit is contained in:
12
main.go
12
main.go
@@ -3,8 +3,18 @@
|
||||
// https://github.com/drakkan/sftpgo/blob/master/README.md
|
||||
package main // import "github.com/drakkan/sftpgo"
|
||||
|
||||
import "github.com/drakkan/sftpgo/cmd"
|
||||
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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user