Documentation
¶
Index ¶
- func ConvertGivenTypeToString(value interface{}, goType string) (output string, exists bool, err error)
- func ConvertStringToGivenType(value string, goType string) (output interface{}, exists bool, err error)
- func DeepCopy(src, dst interface{}) (err error)
- func GetSupportedTypes() []string
- func GoToJSON(goType string) string
- func JSONToGo(jsonType string) (string, error)
- type TypeConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertGivenTypeToString ¶
func ConvertGivenTypeToString(value interface{}, goType string) (output string, exists bool, err error)
ConvertGivenTypeToString converts a given Go type to a string.
Parameters: - value: an interface containing the value to convert - goType: a string containing the Go type to convert from
Returns: - output: a string containing the converted value - exists: a bool indicating whether the conversion was successful - err: an error containing the error message
func ConvertStringToGivenType ¶
func ConvertStringToGivenType(value string, goType string) (output interface{}, exists bool, err error)
ConvertStringToGivenType converts a string to a given Go type.
Parameters: - value: a string containing the value to convert - goType: a string containing the Go type to convert to
Returns: - output: an interface containing the converted value - exists: a bool indicating whether the conversion was successful - err: an error containing the error message
func DeepCopy ¶
func DeepCopy(src, dst interface{}) (err error)
DeepCopy deep copies the source interface to the destination interface.
Parameters: - src: an interface containing the source - dst: an interface containing the destination
Returns: - err: an error containing the error message
func GetSupportedTypes ¶ added in v1.0.5
func GetSupportedTypes() []string
GetSupportedTypes returns a list of all Go types supported by ConvertStringToGivenType.
Returns: - []string: a slice containing all supported Go type names