chore: change interface{} to any (#2818)

* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
This commit is contained in:
Kevin Wan
2023-01-24 16:32:02 +08:00
committed by GitHub
parent 7e0ac77139
commit ae87114282
221 changed files with 1910 additions and 2207 deletions

View File

@@ -14,7 +14,7 @@ type (
// Service represents a remote HTTP service.
Service interface {
// Do sends an HTTP request with the given arguments and returns an HTTP response.
Do(ctx context.Context, method, url string, data interface{}) (*http.Response, error)
Do(ctx context.Context, method, url string, data any) (*http.Response, error)
// DoRequest sends a HTTP request to the service.
DoRequest(r *http.Request) (*http.Response, error)
}
@@ -43,7 +43,7 @@ func NewServiceWithClient(name string, cli *http.Client, opts ...Option) Service
}
// Do sends an HTTP request with the given arguments and returns an HTTP response.
func (s namedService) Do(ctx context.Context, method, url string, data interface{}) (*http.Response, error) {
func (s namedService) Do(ctx context.Context, method, url string, data any) (*http.Response, error) {
req, err := buildRequest(ctx, method, url, data)
if err != nil {
return nil, err