[#638] Update to Go 1.16

Changes:

  * replace `iotuil` elements with the ones from `os` package;
  * replace `os.Filemode` with `fs.FileMode`;
  * use `signal.NotifyContext` instead of `NewGracefulContext` (removed).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-28 17:01:31 +03:00 committed by Leonard Lyubich
parent 61f48a2736
commit 56d4410913
30 changed files with 74 additions and 105 deletions

View file

@ -5,10 +5,11 @@ import (
"flag"
"fmt"
"log"
"os/signal"
"syscall"
"github.com/nspcc-dev/neofs-node/misc"
"github.com/nspcc-dev/neofs-node/pkg/services/control"
"github.com/nspcc-dev/neofs-node/pkg/util/grace"
"go.uber.org/zap"
)
@ -48,7 +49,7 @@ func main() {
}
func initApp(c *cfg) {
c.ctx, c.ctxCancel = context.WithCancel(grace.NewGracefulContext(nil))
c.ctx, c.ctxCancel = signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
initGRPC(c)