Skip to content

Commit c988630

Browse files
committed
breaking change router.Router
1 parent 333770b commit c988630

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

router/router.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func IDOption(id string) Option {
1919

2020
type Route struct {
2121
// Net is the destination network, e.g. 192.168.0.0/16, 172.10.10.0/24.
22+
// Deprecated by Dst.
2223
Net *net.IPNet
2324
// Dst is the destination.
2425
Dst string
@@ -27,6 +28,6 @@ type Route struct {
2728
}
2829

2930
type Router interface {
30-
// GetRoute queries a route by destination IP address.
31-
GetRoute(ctx context.Context, dst net.IP, opts ...Option) *Route
31+
// GetRoute queries a route by destination.
32+
GetRoute(ctx context.Context, dst string, opts ...Option) *Route
3233
}

0 commit comments

Comments
 (0)