mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Drop xerrors dependency (#26718)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
@@ -40,7 +41,6 @@ import (
|
||||
_ "github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/util/errutil"
|
||||
"golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// NewServer returns a new instance of Server.
|
||||
@@ -147,7 +147,7 @@ func (s *Server) Run() (err error) {
|
||||
|
||||
defer func() {
|
||||
s.log.Debug("Waiting on services...")
|
||||
if waitErr := s.childRoutines.Wait(); waitErr != nil && !xerrors.Is(waitErr, context.Canceled) {
|
||||
if waitErr := s.childRoutines.Wait(); waitErr != nil && !errors.Is(waitErr, context.Canceled) {
|
||||
s.log.Error("A service failed", "err", waitErr)
|
||||
if err == nil {
|
||||
err = waitErr
|
||||
@@ -169,7 +169,7 @@ func (s *Server) Shutdown(reason string) {
|
||||
s.shutdownFn()
|
||||
|
||||
// wait for child routines
|
||||
if err := s.childRoutines.Wait(); err != nil && !xerrors.Is(err, context.Canceled) {
|
||||
if err := s.childRoutines.Wait(); err != nil && !errors.Is(err, context.Canceled) {
|
||||
s.log.Error("Failed waiting for services to shutdown", "err", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user