package
0.0.0-20240228044302-56ad08b2fa1c
Repository: https://github.com/parsiya/parsia-code.git
Documentation: pkg.go.dev

# README

Gophercises - 14 - Panic/Recover Middleware

Problem

Solution

  • main.go: Implemented everything including Flusher and Hijack.

Lessons Learned

Print Stacktrace

Custom http.ResponseWriter

See this:

Embed

Embed stuff in structs to use them.

type myRW struct {
    http.ResponseWriter
}

Type Assertion

t, ok := i.(T)
if ok {
    // i.T is implemented and stored in T
}