Documentation
¶
Index ¶
- func CompanySliceCopy(dst *CompanyDest, src *Company)
- func DiffTypeSliceCopy(dst *DestCompany, src *SourceCompany)
- func SliceCopy(dst *SliceDestination, src *SliceSource)
- type Address
- type Company
- type CompanyDest
- type ContactInfo
- type Department
- type DestCompany
- type DestDepartment
- type DestPerson
- type Person
- type SliceDestination
- type SliceSource
- type SourceCompany
- type SourceDepartment
- type SourcePerson
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompanySliceCopy ¶
func CompanySliceCopy(dst *CompanyDest, src *Company)
func DiffTypeSliceCopy ¶
func DiffTypeSliceCopy(dst *DestCompany, src *SourceCompany)
func SliceCopy ¶
func SliceCopy(dst *SliceDestination, src *SliceSource)
Types ¶
type Company ¶
type Company struct { CompanyName string Departments []Department HeadOffice string }
Company represents the source structure with department slice
type CompanyDest ¶
type CompanyDest struct { CompanyName string Departments []Department HeadOffice string }
CompanyDest represents the destination structure
type ContactInfo ¶
ContactInfo represents another nested structure
type Department ¶
Department represents a department with employees
type DestCompany ¶
type DestCompany struct { CompanyName string Departments []DestDepartment HeadOffice string YearFounded int }
DestCompany represents the destination company structure
type DestDepartment ¶
type DestDepartment struct { DeptName string Location string Employees []DestPerson Budget int HeadCount int }
DestDepartment represents a department in destination
type DestPerson ¶
DestPerson represents a person in destination structure
type SliceDestination ¶
type SliceDestination struct { Numbers []int Names []string Addresses []Address Matrix [][]int Contacts []ContactInfo }
SliceDestination mirrors the source structure
type SliceSource ¶
type SliceSource struct { Numbers []int // Simple slice type Names []string // Simple slice type Addresses []Address // Complex slice type Matrix [][]int // Nested slice type Contacts []ContactInfo // Another complex slice type }
SliceSource contains various types of slices
type SourceCompany ¶
type SourceCompany struct { CompanyName string Departments []SourceDepartment HeadOffice string YearFounded int }
SourceCompany represents the source company structure
type SourceDepartment ¶
type SourceDepartment struct { DeptName string Location string Employees []SourcePerson Budget int HeadCount int }
SourceDepartment represents a department in source
Click to show internal directories.
Click to hide internal directories.