mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
cmd/cloner: add Clone context to regen struct assignments
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
618376dbc0
commit
d5ab18b2e6
@ -243,7 +243,7 @@ func gen(buf *bytes.Buffer, imports map[string]struct{}, name string, typ *types
|
||||
writef("return dst")
|
||||
fmt.Fprintf(buf, "}\n\n")
|
||||
|
||||
buf.Write(codegen.AssertStructUnchanged(t, name, "", thisPkg, imports))
|
||||
buf.Write(codegen.AssertStructUnchanged(t, name, "Clone", thisPkg, imports))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ func (src *Prefs) Clone() *Prefs {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _PrefsNeedsRegeneration = Prefs(struct {
|
||||
var _PrefsCloneNeedsRegeneration = Prefs(struct {
|
||||
ControlURL string
|
||||
RouteAll bool
|
||||
AllowSingleHosts bool
|
||||
|
@ -29,7 +29,7 @@ func (src *User) Clone() *User {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _UserNeedsRegeneration = User(struct {
|
||||
var _UserCloneNeedsRegeneration = User(struct {
|
||||
ID UserID
|
||||
LoginName string
|
||||
DisplayName string
|
||||
@ -65,7 +65,7 @@ func (src *Node) Clone() *Node {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _NodeNeedsRegeneration = Node(struct {
|
||||
var _NodeCloneNeedsRegeneration = Node(struct {
|
||||
ID NodeID
|
||||
StableID StableNodeID
|
||||
Name string
|
||||
@ -108,7 +108,7 @@ func (src *Hostinfo) Clone() *Hostinfo {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _HostinfoNeedsRegeneration = Hostinfo(struct {
|
||||
var _HostinfoCloneNeedsRegeneration = Hostinfo(struct {
|
||||
IPNVersion string
|
||||
FrontendLogID string
|
||||
BackendLogID string
|
||||
@ -144,7 +144,7 @@ func (src *NetInfo) Clone() *NetInfo {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _NetInfoNeedsRegeneration = NetInfo(struct {
|
||||
var _NetInfoCloneNeedsRegeneration = NetInfo(struct {
|
||||
MappingVariesByDestIP opt.Bool
|
||||
HairPinning opt.Bool
|
||||
WorkingIPv6 opt.Bool
|
||||
@ -170,7 +170,7 @@ func (src *Login) Clone() *Login {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _LoginNeedsRegeneration = Login(struct {
|
||||
var _LoginCloneNeedsRegeneration = Login(struct {
|
||||
_ structs.Incomparable
|
||||
ID LoginID
|
||||
Provider string
|
||||
@ -210,7 +210,7 @@ func (src *DNSConfig) Clone() *DNSConfig {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DNSConfigNeedsRegeneration = DNSConfig(struct {
|
||||
var _DNSConfigCloneNeedsRegeneration = DNSConfig(struct {
|
||||
Resolvers []dnstype.Resolver
|
||||
Routes map[string][]dnstype.Resolver
|
||||
FallbackResolvers []dnstype.Resolver
|
||||
@ -235,7 +235,7 @@ func (src *RegisterResponse) Clone() *RegisterResponse {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _RegisterResponseNeedsRegeneration = RegisterResponse(struct {
|
||||
var _RegisterResponseCloneNeedsRegeneration = RegisterResponse(struct {
|
||||
User User
|
||||
Login Login
|
||||
NodeKeyExpired bool
|
||||
@ -259,7 +259,7 @@ func (src *DERPRegion) Clone() *DERPRegion {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPRegionNeedsRegeneration = DERPRegion(struct {
|
||||
var _DERPRegionCloneNeedsRegeneration = DERPRegion(struct {
|
||||
RegionID int
|
||||
RegionCode string
|
||||
RegionName string
|
||||
@ -285,7 +285,7 @@ func (src *DERPMap) Clone() *DERPMap {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPMapNeedsRegeneration = DERPMap(struct {
|
||||
var _DERPMapCloneNeedsRegeneration = DERPMap(struct {
|
||||
Regions map[int]*DERPRegion
|
||||
OmitDefaultRegions bool
|
||||
}{})
|
||||
@ -302,7 +302,7 @@ func (src *DERPNode) Clone() *DERPNode {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _DERPNodeNeedsRegeneration = DERPNode(struct {
|
||||
var _DERPNodeCloneNeedsRegeneration = DERPNode(struct {
|
||||
Name string
|
||||
RegionID int
|
||||
HostName string
|
||||
|
@ -24,7 +24,7 @@ func (src *Resolver) Clone() *Resolver {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _ResolverNeedsRegeneration = Resolver(struct {
|
||||
var _ResolverCloneNeedsRegeneration = Resolver(struct {
|
||||
Addr string
|
||||
BootstrapResolution []netaddr.IP
|
||||
}{})
|
||||
|
@ -25,7 +25,7 @@ func (src *Persist) Clone() *Persist {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _PersistNeedsRegeneration = Persist(struct {
|
||||
var _PersistCloneNeedsRegeneration = Persist(struct {
|
||||
_ structs.Incomparable
|
||||
LegacyFrontendPrivateMachineKey key.MachinePrivate
|
||||
PrivateNodeKey wgkey.Private
|
||||
|
@ -27,7 +27,7 @@ func (src *Match) Clone() *Match {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _MatchNeedsRegeneration = Match(struct {
|
||||
var _MatchCloneNeedsRegeneration = Match(struct {
|
||||
IPProto []ipproto.Proto
|
||||
Dsts []NetPortRange
|
||||
Srcs []netaddr.IPPrefix
|
||||
|
@ -31,7 +31,7 @@ func (src *Config) Clone() *Config {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _ConfigNeedsRegeneration = Config(struct {
|
||||
var _ConfigCloneNeedsRegeneration = Config(struct {
|
||||
Name string
|
||||
PrivateKey wgkey.Private
|
||||
Addresses []netaddr.IPPrefix
|
||||
@ -53,7 +53,7 @@ func (src *Peer) Clone() *Peer {
|
||||
}
|
||||
|
||||
// A compilation failure here means this code must be regenerated, with the command at the top of this file.
|
||||
var _PeerNeedsRegeneration = Peer(struct {
|
||||
var _PeerCloneNeedsRegeneration = Peer(struct {
|
||||
PublicKey wgkey.Key
|
||||
DiscoKey tailcfg.DiscoKey
|
||||
AllowedIPs []netaddr.IPPrefix
|
||||
|
Loading…
x
Reference in New Issue
Block a user