25 November, 2018

TIL #2 - go reflection and go http debugging

Notes taken between: 19-23 November 2018


Go reflection

"Reflection in computing is the ability of a program to examine its own structure, particularly through types; it's a form of metaprogramming. It's also a great source of confusion." more here:https://blog.golang.org/laws-of-reflection

requestDump, err := httputil.DumpRequest(r, true)
if err != nil {
    fmt.Println(err)
}
fmt.Println(string(requestDump))