mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-22 12:58:37 +00:00
Fix various linting, vet & static check issues
Fixes #14492 ----- Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Change-Id: I6dc1068d34bbfa7477e7b7a56a4325b3868c92e1 Signed-off-by: Marc Paquette <marcphilippaquette@gmail.com>
This commit is contained in:
parent
60930d19c0
commit
36ea792f06
@ -1,7 +1,7 @@
|
||||
// Copyright (c) Tailscale Inc & AUTHORS
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build go1.19
|
||||
//go:build go1.22
|
||||
|
||||
package tailscale
|
||||
|
||||
|
@ -26,6 +26,7 @@ var AlpineDockerTag string
|
||||
//go:embed go.toolchain.rev
|
||||
var GoToolchainRev string
|
||||
|
||||
//lint:ignore U1000 used by tests + assert_ts_toolchain_match.go w/ right build tags
|
||||
func tailscaleToolchainRev() (gitHash string, ok bool) {
|
||||
bi, ok := debug.ReadBuildInfo()
|
||||
if !ok {
|
||||
|
@ -768,7 +768,7 @@ func ports(s string) PortRange {
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("invalid NetPortRange %q", s))
|
||||
}
|
||||
return PortRange{uint16(first), uint16(last)}
|
||||
return PortRange{First: uint16(first), Last: uint16(last)}
|
||||
}
|
||||
|
||||
func netports(netPorts ...string) (ret []NetPortRange) {
|
||||
@ -814,11 +814,11 @@ func TestMatchesFromFilterRules(t *testing.T) {
|
||||
Dsts: []NetPortRange{
|
||||
{
|
||||
Net: netip.MustParsePrefix("0.0.0.0/0"),
|
||||
Ports: PortRange{22, 22},
|
||||
Ports: PortRange{First: 22, Last: 22},
|
||||
},
|
||||
{
|
||||
Net: netip.MustParsePrefix("::0/0"),
|
||||
Ports: PortRange{22, 22},
|
||||
Ports: PortRange{First: 22, Last: 22},
|
||||
},
|
||||
},
|
||||
Srcs: []netip.Prefix{
|
||||
@ -848,7 +848,7 @@ func TestMatchesFromFilterRules(t *testing.T) {
|
||||
Dsts: []NetPortRange{
|
||||
{
|
||||
Net: netip.MustParsePrefix("1.2.0.0/16"),
|
||||
Ports: PortRange{22, 22},
|
||||
Ports: PortRange{First: 22, Last: 22},
|
||||
},
|
||||
},
|
||||
Srcs: []netip.Prefix{
|
||||
|
@ -6,6 +6,7 @@ package gro
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/tailscale/wireguard-go/tun"
|
||||
"gvisor.dev/gvisor/pkg/buffer"
|
||||
"gvisor.dev/gvisor/pkg/tcpip"
|
||||
|
Loading…
x
Reference in New Issue
Block a user