Skip to content

Commit 3f1f36d

Browse files
committed
vet: atomic nocopy ipn/nop.go
1 parent 892e1b3 commit 3f1f36d

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

intra/ipn/ground.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ type ground struct {
1717
NoDNS
1818
ProtoAgnostic
1919
SkipRefresh
20-
GWNoVia
2120
CantPause
2221
NoClient
22+
*GWNoVia
2323
addr string
2424
hdl uint64
2525
}

intra/ipn/nop.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (w *GW) Reaches(hostportOrIPPortCsvStr string) bool {
104104
}
105105

106106
// ProxyNoGateway is a Router that routes nothing.
107-
var ProxyNoGateway = GWNoVia{GW: GW{nov4: true, nov6: true}}
107+
var ProxyNoGateway = &GWNoVia{GW: GW{nov4: true, nov6: true}}
108108

109109
// ProtoAgnostic is a proxy that does not care about protocol changes.
110110
type ProtoAgnostic struct{}
@@ -175,17 +175,17 @@ type NoProxy struct {
175175
GWNoVia
176176
}
177177

178-
func (NoProxy) Handle() uint64 { return core.Nobody }
179-
func (NoProxy) DialerHandle() uint64 { return core.Nobody }
180-
func (NoProxy) ID() string { return "" }
181-
func (NoProxy) Type() string { return "" }
182-
func (NoProxy) Router() x.Router { return nil }
183-
func (NoProxy) Reaches(string) bool { return false }
184-
func (NoProxy) Self(string) bool { return false }
185-
func (NoProxy) Dial(string, string) (protect.Conn, error) { return nil, errNop }
186-
func (NoProxy) DialBind(string, string, string) (protect.Conn, error) { return nil, errNop }
187-
func (NoProxy) Dialer() protect.RDialer { return nil }
188-
func (NoProxy) Status() int32 { return 0 }
189-
func (NoProxy) GetAddr() string { return "" }
190-
func (NoProxy) Stop() error { return nil }
191-
func (NoProxy) Client() x.Client { return nil }
178+
func (*NoProxy) Handle() uint64 { return core.Nobody }
179+
func (*NoProxy) DialerHandle() uint64 { return core.Nobody }
180+
func (*NoProxy) ID() string { return "" }
181+
func (*NoProxy) Type() string { return "" }
182+
func (*NoProxy) Router() x.Router { return nil }
183+
func (*NoProxy) Reaches(string) bool { return false }
184+
func (*NoProxy) Self(string) bool { return false }
185+
func (*NoProxy) Dial(string, string) (protect.Conn, error) { return nil, errNop }
186+
func (*NoProxy) DialBind(string, string, string) (protect.Conn, error) { return nil, errNop }
187+
func (*NoProxy) Dialer() protect.RDialer { return nil }
188+
func (*NoProxy) Status() int32 { return 0 }
189+
func (*NoProxy) GetAddr() string { return "" }
190+
func (*NoProxy) Stop() error { return nil }
191+
func (*NoProxy) Client() x.Client { return nil }

0 commit comments

Comments
 (0)