Documentation ¶
Index ¶
- type People
- func (m *People) Append(v ...*Person) *People
- func (m *People) AsImmutable(v *People) *People
- func (m *People) AsMutable() *People
- func (m *People) Get(i int) *Person
- func (s *People) IsDeeplyNonMutable(seen map[interface{}]bool) bool
- func (m *People) Len() int
- func (m *People) Mutable() bool
- func (m *People) Range() []*Person
- func (m *People) Set(i int, v *Person) *People
- func (m *People) WithImmutable(f func(mi *People)) *People
- func (m *People) WithMutable(f func(mi *People)) *People
- type Person
- func (s *Person) Age() int
- func (s *Person) AsImmutable(v *Person) *Person
- func (s *Person) AsMutable() *Person
- func (s *Person) IsDeeplyNonMutable(seen map[interface{}]bool) bool
- func (s *Person) Mutable() bool
- func (s *Person) Name() string
- func (s *Person) SetAge(n int) *Person
- func (s *Person) SetName(n string) *Person
- func (s *Person) WithImmutable(f func(si *Person)) *Person
- func (s *Person) WithMutable(f func(si *Person)) *Person
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type People ¶
type People struct {
// contains filtered or unexported fields
}
People is an immutable type and has the following template:
[]*Person
func NewPeopleLen ¶
func (*People) AsImmutable ¶
func (*People) IsDeeplyNonMutable ¶
func (*People) WithImmutable ¶
func (*People) WithMutable ¶
type Person ¶
type Person struct {
// contains filtered or unexported fields
}
Person is an immutable type and has the following template:
struct { Name string Age int }
func (*Person) AsImmutable ¶
func (*Person) IsDeeplyNonMutable ¶
func (*Person) WithImmutable ¶
func (*Person) WithMutable ¶
Click to show internal directories.
Click to hide internal directories.