diff options
Diffstat (limited to 'utils.go')
| -rw-r--r-- | utils.go | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -5,8 +5,6 @@ package flyscrape import ( - "bytes" - "encoding/json" "fmt" "io" "net/http" @@ -15,15 +13,6 @@ import ( const HeaderBypassCache = "X-Flyscrape-Bypass-Cache" -func Prettify(v any, prefix string) string { - var buf bytes.Buffer - enc := json.NewEncoder(&buf) - enc.SetEscapeHTML(false) - enc.SetIndent(prefix, " ") - enc.Encode(v) - return prefix + strings.TrimSuffix(buf.String(), "\n") -} - type RoundTripFunc func(*http.Request) (*http.Response, error) func (f RoundTripFunc) RoundTrip(r *http.Request) (*http.Response, error) { |