Kemampuan proses debug yang terintegrasi sepenuhnya
Penyorotan sintaksis
Penyelesaian kode yang didukung AI
Menginstal Google Cloud CLI.
Google Cloud CLI adalah serangkaian alat untuk Google Cloud. Cloud SDK berisi alat command line gcloud dan bq yang digunakan untuk mengakses Compute Engine, Cloud Storage, BigQuery, dan layanan lainnya dari command line. Anda dapat menjalankan alat ini secara interaktif atau dalam skrip otomatis.
Library Klien Cloud untuk Go
adalah cara idiomatis bagi developer Go untuk berintegrasi dengan
layananGoogle Cloud , seperti Datastore dan Cloud Storage.
Misalnya, untuk menginstal paket untuk setiap API, seperti Cloud Storage API,
lakukan tindakan berikut:
Jika Anda sudah memiliki modul Go untuk project, ubah ke direktori tersebut.
Jika tidak, buat modul:
go mod init YOUR_MODULE_NAME
Ganti YOUR_MODULE_NAME dengan nama modul baru.
Gunakan paket Cloud Storage di project Anda:
go get cloud.google.com/go/storage
Menyiapkan autentikasi
Untuk menggunakan Library Klien Cloud di lingkungan pengembangan lokal, siapkan
Kredensial Default Aplikasi.
If you're using a local shell, then create local authentication credentials for your user
account:
gcloudauthapplication-defaultlogin
You don't need to do this if you're using Cloud Shell.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 UTC."],[[["\u003cp\u003eInstall the Go programming language by following the instructions in the Go Getting Started guide to prepare for development.\u003c/p\u003e\n"],["\u003cp\u003eEnhance Go development efficiency by installing editor plugins or IDEs that offer debugging, syntax highlighting, and code completion.\u003c/p\u003e\n"],["\u003cp\u003eUtilize the Google Cloud CLI, which includes the \u003ccode\u003egcloud\u003c/code\u003e and \u003ccode\u003ebq\u003c/code\u003e command-line tools, to interact with Google Cloud services like Compute Engine and BigQuery.\u003c/p\u003e\n"],["\u003cp\u003eIntegrate Google Cloud services into your Go projects using the Cloud Client Libraries for Go, installing them via the \u003ccode\u003ego get\u003c/code\u003e command, for example \u003ccode\u003ego get cloud.google.com/go/storage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSet up Application Default Credentials for local development by using the \u003ccode\u003egcloud auth application-default login\u003c/code\u003e command, enabling the use of Cloud Client Libraries.\u003c/p\u003e\n"]]],[],null,["# Setting up your development environment\n\nPrepare your environment for\n[Go](https://golang.org/)\napp development and deployment on Google Cloud by installing\nthe following tools.\n\nInstall Go\n----------\n\n1. To install Go, see [Go Getting Started](https://golang.org/doc/install).\n\n2. Confirm that you have the most recent version of Go installed:\n\n go version\n\nInstall an editor\n-----------------\n\nTo maximize your Go development efficacy, these\n[popular editor plugins and IDEs](https://golang.org/doc/editors.html)\nprovide the following features:\n\n- Fully integrated debugging capabilities\n- Syntax highlighting\n- Code completion\n\nInstall the Google Cloud CLI\n----------------------------\n\nThe [Google Cloud CLI](/sdk)\nis a set of tools for Google Cloud. It contains the\n[`gcloud`](/sdk/gcloud)\nand [`bq`](/bigquery/docs/bq-command-line-tool)\ncommand-line tools used to access Compute Engine, Cloud Storage,\nBigQuery, and other services from the command line. You can run these\ntools interactively or in your automated scripts.\n\nFor example, to [deploy a Go web app](/appengine/docs/standard/go/create-app) with a `main`\npackage to App Engine, run the following command: \n\n gcloud app deploy\n\nTo install the gcloud CLI, see [Installing the gcloud CLI](/sdk/install).\n\nInstall the Cloud Client Libraries for Go\n-----------------------------------------\n\nThe [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)\nis the idiomatic way for Go developers to integrate with\nGoogle Cloud services, such as Datastore and Cloud Storage.\n\nFor example, to install the package for an individual API, such as the Cloud Storage API,\ndo the following:\n\n1. If you already have a Go module for your project, change to that directory.\n Otherwise, create a module:\n\n ```\n go mod init YOUR_MODULE_NAME\n ```\n\n \u003cbr /\u003e\n\n Replace \u003cvar translate=\"no\"\u003eYOUR_MODULE_NAME\u003c/var\u003e with the name of the new module.\n2. Use the Cloud Storage package in your project:\n\n ```\n go get cloud.google.com/go/storage\n ```\n\n \u003cbr /\u003e\n\n | **Note:** The source of the Cloud Client Libraries for Go is [on GitHub](https://github.com/googleapis/google-cloud-go)\n\nSet up authentication\n---------------------\n\nTo use the Cloud Client Libraries in a local development environment, set\nup Application Default Credentials.\n\n\nIf you're using a local shell, then create local authentication credentials for your user\naccount:\n\n```bash\ngcloud auth application-default login\n```\n\nYou don't need to do this if you're using Cloud Shell.\n\n\nIf an authentication error is returned, and you are using an external identity provider\n(IdP), confirm that you have\n[signed in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\nFor more information, see\n[Authenticate for using client libraries](/docs/authentication/client-libraries).\n\nInstall other useful tools\n--------------------------\n\nFor a comprehensive list of Go tools and libraries, see\n[this list of Go frameworks, libraries, and software on GitHub](https://github.com/avelino/awesome-go).\n\nWhat's next\n-----------\n\n- Learn more about [Go on Google Cloud](/go).\n- Deploy a Go app on [App Engine](/appengine/docs/standard/go/create-app).\n- Explore [authentication methods at Google](/docs/authentication).\n- Browse the [documentation for Google Cloud products](/products).\n- Clone the [Go samples repository from GitHub](https://github.com/GoogleCloudPlatform/golang-samples)."]]