| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | package gotil |
||
| 2 | |||
| 3 | import "github.com/gotilty/gotil/internal" |
||
| 4 | |||
| 5 | //HexDecode returns empty string with an error if the parameter is unsupported type. |
||
| 6 | //Just works with all primitive types |
||
| 7 | //If given parameter is different type instead of string, firstly, it will convert the given parameter to string with gotil.ToString(). |
||
| 8 | func HexDecode(a interface{}) (string, error) { |
||
| 9 | return internal.HexDecode(a) |
||
| 10 | } |
||
| 11 | |||
| 12 | //HexEncode returns empty string if the parameter is unsupported type. |
||
| 13 | //Just works with all primitive types. |
||
| 14 | //In decimal numbers, it should be used as a "string" in numbers where the total number of digits is too many. |
||
| 15 | func HexEncode(a interface{}) (string, error) { |
||
| 16 | return internal.HexEncode(a) |
||
| 17 | |||
| 19 |