Discover Packages
github.com/kyaxcorp/go-core
core
helpers
_struct
defaults
package
Version:
v0.0.1-20231017-0003
Opens a new window with list of versions in this module.
Published: Oct 17, 2023
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
Documentation
Documentation
¶
func CanUpdate(v interface{}) bool
CanUpdate returns true when the given value is an initial value of its type
func MustSet(ptr interface{})
MustSet function is a wrapper of Set function
It will call Set and panic if err not equals nil.
func Set(ptr interface{}) error
Set initializes members in a struct referenced by a pointer.
Maps and slices are initialized by `make` and other primitive types are set with default values.
`ptr` should be a struct pointer
type Setter interface {
SetDefaults()
}
Setter is an interface for setting default values
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.