func ParseResponse(resp resty.Response) (res libs.Response) {
	resLength := len(string(resp.Body()))
	var resHeaders []map[string]string
	for k, v := range resp.RawResponse.Header {
		if k == "Content-Type" {
			res.ContentType = strings.Join(v[:], "")
		}
		if k == "Location" {
			res.Location = strings.Join(v[:], "")
		}
		element := make(map[string]string)
		element[k] = strings.Join(v[:], "")
		resLength += len(fmt.Sprintf("%s: %s\n", k, strings.Join(v[:], "")))
		resHeaders = append(resHeaders, element)
	}
	resTime := float64(resp.Time()) / float64(time.Second)
	resHeaders = append(resHeaders,
		map[string]string{"Total Length": strconv.Itoa(resLength)},
		map[string]string{"Response Time": fmt.Sprintf("%f", resTime)},
	)
	res.Headers = resHeaders
	res.StatusCode = resp.StatusCode()
	res.Status = fmt.Sprintf("%v %v", resp.Status(), resp.RawResponse.Proto)
	res.Body = string(resp.Body())
	res.ResponseTime = resTime
	res.Length = resLength
	res.Beautify = BeautifyResponse(res)
	res.BeautifyHeader = BeautifyHeaders(res)
	return res
}
ParseResponse field to Response
package core
import (
	"bufio"
	"crypto/tls"
	"encoding/base64"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"
	"github.com/go-resty/resty/v2"
	"github.com/j3ssie/goverview/libs"
	"github.com/j3ssie/goverview/utils"
	"github.com/sirupsen/logrus"
)
func BuildClient(options libs.Options) *resty.Client {
	headers := map[string]string{
		"UserAgent":  "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36",
		"Accept":     "*/*",
		"AcceptLang": "en-US,en;q=0.8",
	}
	timeout := options.Timeout
	if len(options.Headers) > 0 {
		for _, head := range options.Headers {
			if strings.Contains(head, ":") {
				data := strings.Split(head, ":")
				if len(data) < 2 {
					continue
				}
				headers[data[0]] = strings.Join(data[1:], "")
			}
		}
	}
	logger := logrus.New()
	if !options.Debug {
		logger.Out = ioutil.Discard
	}
	client := resty.New()
	client.SetLogger(logger)
	client.SetTransport(&http.Transport{
		MaxIdleConns:          100,
		MaxConnsPerHost:       1000,
		IdleConnTimeout:       time.Duration(timeout) * time.Second,
		ExpectContinueTimeout: time.Duration(timeout) * time.Second,
		ResponseHeaderTimeout: time.Duration(timeout) * time.Second,
		TLSHandshakeTimeout:   time.Duration(timeout) * time.Second,
		DisableCompression:    true,
		TLSClientConfig:       &tls.Config{InsecureSkipVerify: true},
	})
	if options.Proxy != "" {
		client.SetProxy(options.Proxy)
	}
	client.SetHeaders(headers)
	client.SetCloseConnection(true)
	if options.Retry > 0 {
		client.SetRetryCount(options.Retry)
	}
	client.SetTimeout(time.Duration(timeout) * time.Second)
	client.SetRetryWaitTime(time.Duration(timeout/2) * time.Second)
	client.SetRetryMaxWaitTime(time.Duration(timeout) * time.Second)
	return client
}
func JustSend(options libs.Options, url string, client *resty.Client) (res libs.Response, err error) {
	method := "GET"
	timeStart := time.Now()
	if options.Redirect == false {
		client.SetRedirectPolicy(resty.RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error {
			res.StatusCode = req.Response.StatusCode
			res.Status = req.Response.Status
			resp := req.Response
			bodyBytes, err := ioutil.ReadAll(resp.Body)
			if err != nil {
				utils.ErrorF("%v", err)
			}
			bodyString := string(bodyBytes)
			resLength := len(bodyString)
			var resHeaders []map[string]string
			for k, v := range resp.Header {
				if k == "Content-Type" {
					res.ContentType = strings.Join(v[:], "")
				}
				if k == "Location" {
					res.Location = strings.Join(v[:], "")
				}
				element := make(map[string]string)
				element[k] = strings.Join(v[:], "")
				resLength += len(fmt.Sprintf("%s: %s\n", k, strings.Join(v[:], "")))
				resHeaders = append(resHeaders, element)
			}
			resTime := time.Since(timeStart).Seconds()
			resHeaders = append(resHeaders,
				map[string]string{"Total Length": strconv.Itoa(resLength)},
				map[string]string{"Response Time": fmt.Sprintf("%f", resTime)},
			)
			res.Headers = resHeaders
			res.StatusCode = resp.StatusCode
			res.Status = fmt.Sprintf("%v %v", resp.Status, resp.Proto)
			res.Body = bodyString
			res.ResponseTime = resTime
			res.Length = resLength
			res.Beautify = BeautifyResponse(res)
			res.BeautifyHeader = BeautifyHeaders(res)
			return errors.New("auto redirect is disabled")
		}))
		client.AddRetryCondition(
			func(r *resty.Response, err error) bool {
				return false
			},
		)
	} else {
		client.SetRedirectPolicy(resty.RedirectPolicyFunc(func(req *http.Request, via []*http.Request) error {
			return nil
		}))
	}
	var resp *resty.Response
	method = strings.ToLower(strings.TrimSpace(method))
	switch method {
	case "get":
		resp, err = client.R().
			Get(url)
		break
	}
	if res.StatusCode != 0 {
		return res, nil
	}
	if err != nil || resp == nil {
		utils.ErrorF("%v %v", url, err)
		return libs.Response{}, err
	}
	return ParseResponse(*resp), nil
}