wgengine: flesh out some docs, minor cleanups

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2020-02-11 15:21:24 -08:00
committed by Brad Fitzpatrick
parent 819daf10e2
commit 7e5e32775a
4 changed files with 24 additions and 13 deletions

View File

@@ -16,11 +16,10 @@ type fakeRouter struct {
}
func NewFakeRouter(logf logger.Logf, tunname string, dev *device.Device, tuntap tun.Device, netChanged func()) Router {
r := fakeRouter{
return &fakeRouter{
logf: logf,
tunname: tunname,
}
return &r
}
func (r *fakeRouter) Up() error {
@@ -33,6 +32,7 @@ func (r *fakeRouter) SetRoutes(rs RouteSettings) error {
return nil
}
func (r *fakeRouter) Close() {
func (r *fakeRouter) Close() error {
r.logf("Warning: fakeRouter.Close: not implemented.\n")
return nil
}