Sample code for 30+ languages & platforms
Go

Wasabi Delete Bucket

See more Wasabi Examples

Demonstrates how to delete a new Wasabi bucket.

Chilkat Go Downloads

Go
    success := false

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    http := chilkat.NewHttp()

    // Insert your access key here:
    http.SetAwsAccessKey("access-key")

    // Insert your secret key here:
    http.SetAwsSecretKey("secret-key")

    // To delete a bucket located in a different region, use the domain for that region, such as "s3.eu-central-1.wasabisys.com"
    http.SetAwsEndpoint("s3.wasabisys.com")

    http.SetKeepResponseBody(true)

    success = http.S3_DeleteBucket("chilkat-wasabi-testbucket")

    if success != true {
        fmt.Println(http.LastErrorText())
        // Also examine the error response body from Wasabi:
        fmt.Println(http.LastResponseBody())
    } else {
        fmt.Println("Bucket deleted.")
    }


    http.DisposeHttp()