Skip to content

Commit

Permalink
Additional debug info on the HTTP Request object.
Browse files Browse the repository at this point in the history
  • Loading branch information
captbrando committed Apr 13, 2020
1 parent 0220fe7 commit d9875cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ func ServeHTTP(w http.ResponseWriter, r *http.Request) {
for i := len(Data) - 1; i >= 0; i-- {
if currTime >= Data[i].Time {
if WeDebugging { // Output some debugging info.
fmt.Printf("Contents of the HTTP Request: ")
fmt.Println(r)
fmt.Printf("Contents of the HTTP Request: \n%+v\n\n", *r)
fmt.Printf("Current time is %v, currTime is %v, and the Data[%v] time is %v\n", time.Now(), currTime, i, Data[i].Time)
}
http.Redirect(w, r, Data[i].URL, 303)
Expand Down

0 comments on commit d9875cc

Please sign in to comment.