func (client *Client) DoesBucketExitsWithContext(ctx context.Context, bucketName string) (bool, error) {
	req := &clientRequest{
		BucketName: bucketName,
		Method:     HTTPHead,
	}

	resp, err := client.do(ctx, req)
	if err != nil {
		return false, err
	}
	defer resp.Body.Close()

	if resp.StatusCode == http.StatusOK {
		return true, nil
	}

	return false, nil
}
// DoesBucketExitsWithContext judge whether bucket exitst with context controlling
DoesBucketExitsWithContext judge whether bucket exitst with context controlling
// DoesBucketExitsWithContext judge whether bucket exitst with context controlling
func (client *Client) DoesBucketExitsWithContext(ctx context.Context, bucketName string) (bool, error) {
	req := &clientRequest{
		BucketName: bucketName,
		Method:     HTTPHead,
	}
	resp, err := client.do(ctx, req)
	if err != nil {
		return false, err
	}
	defer resp.Body.Close()
	if resp.StatusCode == http.StatusOK {
		return true, nil
	}
	return false, nil
}
func ( client * Client ) DoesBucketExitsWithContext ( ctx context . Context , bucketName string ) ( bool , error ) { req := & clientRequest { BucketName : bucketName , Method : HTTPHead , } resp , err := client . do ( ctx , req ) if err != nil { return false , err } defer resp . Body . Close ( ) if resp . StatusCode == http . StatusOK { return true , nil } return false , nil }
DoesBucketExitsWithContext judge whether bucket exitst with context controlling
DoesBucketExitsWithContext judge whether bucket exitst with context controlling