Skip to content

Commit

Permalink
Use standard library context package
Browse files Browse the repository at this point in the history
Use Go's standard library context package instead of the
golang.org/x/net/context package. Package context has been available in
the standard library since Go 1.7 and x/net/context.Context is merely an
alias for the standard library type.
  • Loading branch information
tklauser committed Apr 18, 2023
1 parent bab5b30 commit 88da915
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/gobgpd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package main

import (
"context"
"crypto/tls"
"crypto/x509"
"fmt"
Expand All @@ -35,7 +36,6 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/sirupsen/logrus"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
github.com/spf13/viper v1.15.0
github.com/stretchr/testify v1.8.1
github.com/vishvananda/netlink v1.2.1-beta.2
golang.org/x/net v0.8.0
golang.org/x/sys v0.6.0
golang.org/x/text v0.8.0
google.golang.org/grpc v1.53.0
Expand Down Expand Up @@ -50,6 +49,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
golang.org/x/net v0.8.0 // indirect
google.golang.org/genproto v0.0.0-20230320184635-7606e756e683 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
3 changes: 2 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package config

import (
"golang.org/x/net/context"
"context"

apb "google.golang.org/protobuf/types/known/anypb"

api "github.com/osrg/gobgp/v3/api"
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/grpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package server

import (
"bytes"
"context"
"fmt"
"io"
"net"
Expand All @@ -28,7 +29,6 @@ import (
"time"

"github.com/dgryski/go-farm"
"golang.org/x/net/context"
"google.golang.org/grpc"
apb "google.golang.org/protobuf/types/known/anypb"
"google.golang.org/protobuf/types/known/emptypb"
Expand Down
3 changes: 1 addition & 2 deletions pkg/server/rpki.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
package server

import (
"context"
"encoding/binary"
"fmt"
"io"
"net"
"strconv"
"time"

"golang.org/x/net/context"

"github.com/osrg/gobgp/v3/internal/pkg/config"
"github.com/osrg/gobgp/v3/internal/pkg/table"
"github.com/osrg/gobgp/v3/pkg/log"
Expand Down

0 comments on commit 88da915

Please sign in to comment.