feat: sdk migration in progress

This commit is contained in:
allanice001
2025-11-02 13:19:30 +00:00
commit 0d10d42442
492 changed files with 71067 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package provider
import (
"fmt"
"io"
"net/http"
)
func httpErr(err error, resp *http.Response) string {
if resp == nil {
return err.Error()
}
defer resp.Body.Close()
b, _ := io.ReadAll(resp.Body)
return fmt.Sprintf("status=%d: %s (body=%s)", resp.StatusCode, resp.Status, string(b))
}
func isNotFound(resp *http.Response) bool {
return resp != nil && resp.StatusCode == http.StatusNotFound
}