2024-04-01 18:13:10 +08:00

15 lines
260 B
Go

package util
import (
"fmt"
"github.com/elastic/go-elasticsearch/v7/esapi"
)
func CheckES7Response(result *esapi.Response) error {
if result.StatusCode != 200 {
return fmt.Errorf("status=%s msg=%s", result.StatusCode, result.String())
}
return nil
}