Documentation ¶
Index ¶
- func ErrFatal(err error)
- func JSONToIface(jsonData []byte) interface{}
- func JSONToStruct(jsonData []byte, model interface{})
- func PPrintJSON(jsonData []byte)
- func RequestDump(req *http.Request, body bool, logLevel string)
- func ResponseDump(resp *http.Response, body bool, logLevel string)
- func StructToJSON(structData interface{}) *bytes.Buffer
- func UserInput(prompt string, echo bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONToIface ¶
func JSONToIface(jsonData []byte) interface{}
JSONToIface unmarshals JSON data to an interface
func JSONToStruct ¶
func JSONToStruct(jsonData []byte, model interface{})
JSONToStruct unmarshals JSON to struct
func RequestDump ¶
RequestDump logs the entire HTTP request for debugging
func ResponseDump ¶
ResponseDump logs entire HTTP response for debugging
func StructToJSON ¶
StructToJSON marshals struct data to JSON
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.