Skip to content

Instantly share code, notes, and snippets.

@kkdai
Forked from adityarama1210/main.go
Last active March 21, 2022 13:40
Show Gist options
  • Save kkdai/96a7c3a9c1b74d40330c1b132b023726 to your computer and use it in GitHub Desktop.
Save kkdai/96a7c3a9c1b74d40330c1b132b023726 to your computer and use it in GitHub Desktop.
Test Uploader GCP
package main
import (
"cloud.google.com/go/storage"
"context"
"log"
)
const (
projectID = "your-project-id" // FILL IN WITH YOURS
bucketName = "your-bucket-name" // FILL IN WITH YOURS
)
func main() {
_, err := storage.NewClient(context.Background())
if err != nil {
log.Fatalf("Failed to create client: %v", err)
}
log.Print("login GCP success")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment