|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
// Code generated by tailscale.com/util/codegen (viewer); DO NOT EDIT.
|
|
|
|
|
// Code generated by tailscale/cmd/viewer; DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
package dnstype
|
|
|
|
|
|
|
|
|
@ -15,14 +15,18 @@ import (
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
//go:generate go run tailscale.com/cmd/cloner -clonefunc=true -type=Resolver
|
|
|
|
|
|
|
|
|
|
// View returns a readonly view of Resolver.
|
|
|
|
|
func (p *Resolver) View() ResolverView {
|
|
|
|
|
return ResolverView{ж: p}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ResolverView provides a read-only view on Resolver.
|
|
|
|
|
// It's methods should only be called if `Valid()` returns true.
|
|
|
|
|
// ResolverView provides a read-only view over Resolver.
|
|
|
|
|
//
|
|
|
|
|
// Its methods should only be called if `Valid()` returns true.
|
|
|
|
|
type ResolverView struct {
|
|
|
|
|
// ж is the underlying mutable value, named with a hard-to-type
|
|
|
|
|
// character that looks pointy like a pointer.
|
|
|
|
|
// It is named distinctively to make you think of how dangerous it is to escape
|
|
|
|
|
// to callers. You must not let callers be able to mutate it.
|
|
|
|
|
ж *Resolver
|
|
|
|
@ -34,7 +38,7 @@ func (v ResolverView) Valid() bool { return v.ж != nil }
|
|
|
|
|
// AsStruct returns a clone of the underlying value which aliases no memory with
|
|
|
|
|
// the original.
|
|
|
|
|
func (v ResolverView) AsStruct() *Resolver {
|
|
|
|
|
if v.ж != nil {
|
|
|
|
|
if v.ж == nil {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
return v.ж.Clone()
|
|
|
|
|