Documentation ¶
Overview ¶
gonverter package provides a homogeneous conversion interface for Go basic types, based on a type names initials pattern:
´int´ -> I ´string´ -> S ´bool´ -> B ...
This pattern makes possible to achieve conversions easily:
´int´ to ´string´: ItoS ´bool´ to ´int´: BtoS ...
Disclaimer: Go already provides simple native conversions. This package does not aim to replace them, just to put all of them together, making easier to the Go developer to find the right conversion way without digging in multiple doc sources.
TODO:
´int8´ -> I8 ´int16´ -> I16 ´int32´ -> I32 ´int64´ -> I64 ´uint´ -> U ´uint8´ -> U8 ´byte´ -> BY // alias for uint8 ´uint16´ -> U16 ´uint32´ -> U32 ´rune´ -> R // alias for int32 ´uint64´ -> U64 ´uintptr´ -> Uptr ´float32´ -> F ´float64´ -> F64 ´complex64´ -> C ´complex128´ -> C128
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BtoS ¶
BtoS `bool` => `string` If `bool` is true return "true", if false returns "false" Note: It is not reciprocal to StoB
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.