Showing 4 of 9 total issues
Client
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
Open
func (client *Client) ListModels(ctx context.Context) (resp ModelsListResponse, err error) {
p := "/models"
return call(ctx, client, http.MethodGet, p, nil, resp, nil)
}
Method ImageEditRequestBody.ToMultipartFormData
has 7 return statements (exceeds 4 allowed). Open
Open
func (body ImageEditRequestBody) ToMultipartFormData() (buf *bytes.Buffer, contenttype string, err error) {
if body.Image == nil {
return nil, "", fmt.Errorf("body.Image must not be nil")
}
buf = bytes.NewBuffer(nil)
Method Client.RetrieveFileContent
has 5 return statements (exceeds 4 allowed). Open
Open
func (client *Client) RetrieveFileContent(ctx context.Context, id string) (res io.ReadCloser, err error) {
endpoint, err := client.endpoint(fmt.Sprintf("/files/%s/content", id))
if err != nil {
return nil, err
}
Method Funcs.invoke
has 5 return statements (exceeds 4 allowed). Open
Open
func (funcs Funcs) invoke(invocation Invocation) any {
f, ok := funcs[invocation.Name()]
if !ok {
return fmt.Sprintf("function not found: `%s`", invocation.Name())
}