mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-03 22:21:17 +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")
|
writef("return dst")
|
||||||
fmt.Fprintf(buf, "}\n\n")
|
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.
|
// 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
|
ControlURL string
|
||||||
RouteAll bool
|
RouteAll bool
|
||||||
AllowSingleHosts 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.
|
// 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
|
ID UserID
|
||||||
LoginName string
|
LoginName string
|
||||||
DisplayName 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.
|
// 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
|
ID NodeID
|
||||||
StableID StableNodeID
|
StableID StableNodeID
|
||||||
Name string
|
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.
|
// 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
|
IPNVersion string
|
||||||
FrontendLogID string
|
FrontendLogID string
|
||||||
BackendLogID 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.
|
// 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
|
MappingVariesByDestIP opt.Bool
|
||||||
HairPinning opt.Bool
|
HairPinning opt.Bool
|
||||||
WorkingIPv6 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.
|
// 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
|
_ structs.Incomparable
|
||||||
ID LoginID
|
ID LoginID
|
||||||
Provider string
|
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.
|
// 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
|
Resolvers []dnstype.Resolver
|
||||||
Routes map[string][]dnstype.Resolver
|
Routes map[string][]dnstype.Resolver
|
||||||
FallbackResolvers []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.
|
// 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
|
User User
|
||||||
Login Login
|
Login Login
|
||||||
NodeKeyExpired bool
|
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.
|
// 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
|
RegionID int
|
||||||
RegionCode string
|
RegionCode string
|
||||||
RegionName 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.
|
// 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
|
Regions map[int]*DERPRegion
|
||||||
OmitDefaultRegions bool
|
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.
|
// 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
|
Name string
|
||||||
RegionID int
|
RegionID int
|
||||||
HostName string
|
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.
|
// 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
|
Addr string
|
||||||
BootstrapResolution []netaddr.IP
|
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.
|
// 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
|
_ structs.Incomparable
|
||||||
LegacyFrontendPrivateMachineKey key.MachinePrivate
|
LegacyFrontendPrivateMachineKey key.MachinePrivate
|
||||||
PrivateNodeKey wgkey.Private
|
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.
|
// 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
|
IPProto []ipproto.Proto
|
||||||
Dsts []NetPortRange
|
Dsts []NetPortRange
|
||||||
Srcs []netaddr.IPPrefix
|
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.
|
// 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
|
Name string
|
||||||
PrivateKey wgkey.Private
|
PrivateKey wgkey.Private
|
||||||
Addresses []netaddr.IPPrefix
|
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.
|
// 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
|
PublicKey wgkey.Key
|
||||||
DiscoKey tailcfg.DiscoKey
|
DiscoKey tailcfg.DiscoKey
|
||||||
AllowedIPs []netaddr.IPPrefix
|
AllowedIPs []netaddr.IPPrefix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user