Documentation
¶
Overview ¶
Package baseline provides a mechanism for applying baseline overrides to Go structs
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply[T any](dst, src *T)
Apply applies a baseline to the destination struct.
For every field in the destination struct that is not set to its zero value, it sets the corresponding field in the destination struct to the value in the source struct. The value of the source struct is cloned if it contains a pass-by-reference type with interior mutability so that the original source value is not modified by changes to the applied baseline in the destination struct.
Only directly exported fields are considered.
Types ¶
This section is empty.