code cleanup

This commit is contained in:
stefanodvx 2025-04-24 12:20:35 +02:00
parent 917be1687f
commit 5336968e05
34 changed files with 193 additions and 115 deletions

View file

@ -3,14 +3,16 @@ package util
import (
"bytes"
"fmt"
"govd/models"
"io"
"net/http"
"net/url"
"strconv"
"time"
"govd/models"
"github.com/bytedance/sonic"
"github.com/pkg/errors"
)
type EdgeProxyClient struct {
@ -48,7 +50,7 @@ func NewEdgeProxy(
func (c *EdgeProxyClient) Do(req *http.Request) (*http.Response, error) {
if c.proxyURL == "" {
return nil, fmt.Errorf("proxy URL is not set")
return nil, errors.New("proxy URL is not set")
}
targetURL := req.URL.String()