func (client *Client) SetLifecycleConfigWithContext(ctx context.Context, bucketName string, config *LifecycleConfig) error {
	data, err := json.Marshal(config)
	if err != nil {
		return err
	}

	req := &clientRequest{
		BucketName:         bucketName,
		Method:             HTTPPut,
		QueryHeaderOptions: lifecycleOption{},
		Data:               bytes.NewReader(data),
	}

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

	return err
}
// SetLifecycleConfigWithContext sets LifecycleConfig of bucket with context controlling
SetLifecycleConfigWithContext sets LifecycleConfig of bucket with context controlling
// SetLifecycleConfigWithContext sets LifecycleConfig of bucket with context controlling
func (client *Client) SetLifecycleConfigWithContext(ctx context.Context, bucketName string, config *LifecycleConfig) error {
	data, err := json.Marshal(config)
	if err != nil {
		return err
	}
	req := &clientRequest{
		BucketName:         bucketName,
		Method:             HTTPPut,
		QueryHeaderOptions: lifecycleOption{},
		Data:               bytes.NewReader(data),
	}
	resp, err := client.do(ctx, req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	return err
}
func ( client * Client ) SetLifecycleConfigWithContext ( ctx context . Context , bucketName string , config * LifecycleConfig ) error { data , err := json . Marshal ( config ) if err != nil { return err } req := & clientRequest { BucketName : bucketName , Method : HTTPPut , QueryHeaderOptions : lifecycleOption { } , Data : bytes . NewReader ( data ) , } resp , err := client . do ( ctx , req ) if err != nil { return err } defer resp . Body . Close ( ) return err }
SetLifecycleConfigWithContext sets LifecycleConfig of bucket with context controlling
SetLifecycleConfigWithContext sets LifecycleConfig of bucket with context controlling