MCPcopy Index your code
hub / github.com/GoogleCloudPlatform/golang-samples

github.com/GoogleCloudPlatform/golang-samples @main sqlite

repository ↗ · DeepWiki ↗
5,352 symbols 32,638 edges 2,708 files 2,360 documented · 44%
README

Google Cloud Platform Go Samples

This repository holds sample code written in Go that demonstrates the Google Cloud Platform.

Some samples have accompanying guides on cloud.google.com. See respective README files for details.

Google Cloud Samples

To browse ready to use code samples check Google Cloud Samples.

Depending on samples

Copy any code you need from this repository into your own project.

Warning: Do not depend directly on the samples in this repo. Breaking changes may be made at any time without warning.

Contributing changes

Interested in contributing a new sample? Please open an issue describing the intended sample. Additionally, bug fixes are welcome, either as pull requests or as GitHub issues.

See CONTRIBUTING.md for details on how to contribute.

Licensing

Code in this repository is licensed under the Apache 2.0. See LICENSE.

Extension points exported contracts — how you extend this code

BookDatabase (Interface)
BookDatabase provides thread-safe access to a database of books. [2 implementers]
getting-started/bookshelf/bookshelf.go
Platform (Interface)
Platform describes how platforms are defined. [1 implementers]
internal/cloudrunci/platform.go
MessageService (Interface)
Interface for sending messages [1 implementers]
getting-started/devflowapp/services/services.go
MarkdownRenderer (Interface)
MarkdownRenderer defines an interface for rendering Markdown to HTML. [1 implementers]
run/markdown-preview/editor/service.go
ClientInterface (Interface)
(no doc) [2 implementers]
compute/reservations/mock_shared_project.go
PredictClientInterface (Interface)
(no doc) [1 implementers]
vertexai/gemma2/gemma2_test.go
RoundTripFn (FuncType)
(no doc)
appengine/go11x/pubsub/authenicated_push/main_test.go
InstanceClientInterface (Interface)
(no doc) [2 implementers]
compute/reservations/mock_shared_project.go

Core symbols most depended-on inside this repo

Errorf
called by 7602
internal/testutil/retry.go
Close
called by 1942
vertexai/gemma2/gemma2_test.go
SystemTest
called by 829
internal/testutil/testutil.go
String
called by 799
run/logging-manual/main.go
Run
called by 737
internal/testutil/runmain.go
String
called by 632
compute/instances/custom-machine-type/helper_class.go
Error
called by 472
functions/slack/search.go
Retry
called by 463
internal/testutil/retry.go

Shape

Function 4,617
Method 406
Struct 289
Interface 17
FuncType 14
TypeAlias 9

Languages

Go100%

Modules by API surface

firestore/pipeline_snippets_general.go104 symbols
spanner/spanner_snippets/spanner/integration_test.go70 symbols
secretmanager/secretmanager_test.go68 symbols
datastore/snippets/snippet_test.go57 symbols
run/grpc-ping/pkg/api/v1/message.pb.go52 symbols
run/grpc-server-streaming/pkg/api/v1/timeservice.pb.go42 symbols
kms/kms_test.go35 symbols
profiler/shakesapp/shakesapp/shakesapp.pb.go34 symbols
internal/cloudrunci/cloudrunci.go34 symbols
bigquery/snippets/managedwriter/exampleproto/sample_data.pb.go33 symbols
parametermanager/regional_samples/regional_parametermanager_test.go31 symbols
internal/managedkafka/fake/fake.go31 symbols

Dependencies from manifests, versioned

cel.dev/exprv0.25.1 · 1×
cloud.google.com/gov0.118.0 · 1×
cloud.google.com/go/accesscontextmanagerv1.9.3 · 1×
cloud.google.com/go/aiplatformv1.70.0 · 1×
cloud.google.com/go/assetv1.20.4 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.7 · 1×
cloud.google.com/go/batchv1.12.2 · 1×
cloud.google.com/go/bigqueryv1.65.0 · 1×
cloud.google.com/go/bigquery/v2v2.0.0-2025071018062 · 1×
cloud.google.com/go/bigtablev1.34.0 · 1×
cloud.google.com/go/cloudprofilerv0.3.4 · 1×

Datastores touched

citiesCollection · 1 repos
usersCollection · 1 repos
coffee-beansCollection · 1 repos
translationsCollection · 1 repos
booksCollection · 1 repos
shardsCollection · 1 repos
counter_samplesCollection · 1 repos
countriesCollection · 1 repos

For agents

$ claude mcp add golang-samples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact