code cleanup
This commit is contained in:
parent
917be1687f
commit
5336968e05
34 changed files with 193 additions and 115 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue