Skip to content

Commit

Permalink
Reformat Go code
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwager committed Jun 24, 2024
1 parent 75adf50 commit 78b0aaa
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions content/docs/web/burp/tips/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,24 +497,24 @@ We will use the following Go code named as `req.go` to test HTTP requests:
package main

import (
"io/ioutil"
"log"
"net/http"
"io/ioutil"
"log"
"net/http"
)

func main() {
resp, err := http.Get("https://www.google.com")
if err != nil {
log.Fatalln("Unable to get response from server:", err)
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatalln("Unable to read response body:", err)
}

log.Println("Response from Google:", string(body))
resp, err := http.Get("https://www.google.com")
if err != nil {
log.Fatalln("Unable to get response from server:", err)
}
defer resp.Body.Close()

body, err := ioutil.ReadAll(resp.Body)
if err != nil {
log.Fatalln("Unable to read response body:", err)
}

log.Println("Response from Google:", string(body))
}
```

Expand Down

0 comments on commit 78b0aaa

Please sign in to comment.