[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThe Go runtime for App Engine is specified in the \u003ccode\u003eapp.yaml\u003c/code\u003e file using the format \u003ccode\u003eruntime: goVERSION\u003c/code\u003e, where VERSION indicates the major and minor Go version numbers.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine automatically updates the Go runtime to new patch revisions, but major version updates require manual configuration within the \u003ccode\u003eapp.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eThe runtime sets several environment variables, such as \u003ccode\u003eGAE_APPLICATION\u003c/code\u003e, \u003ccode\u003eGAE_VERSION\u003c/code\u003e, and \u003ccode\u003eGOOGLE_CLOUD_PROJECT\u003c/code\u003e, providing key information about the application and its deployment.\u003c/p\u003e\n"],["\u003cp\u003eApplications can utilize the metadata server, accessible via \u003ccode\u003ehttp://metadata\u003c/code\u003e or \u003ccode\u003ehttp://metadata.google.internal\u003c/code\u003e, to query instance and project-related information by sending requests that include the header \u003ccode\u003eMetadata-Flavor: Google\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine provides a writable \u003ccode\u003e/tmp\u003c/code\u003e directory for temporary file storage, while other directories are read-only, and writing to \u003ccode\u003e/tmp\u003c/code\u003e utilizes system memory.\u003c/p\u003e\n"]]],[],null,["# Go runtime environment\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n\u003cbr /\u003e\n\n\nThe Go runtime is the software stack responsible for installing\nyour web service's code and its dependencies and running your service.\n\nThe Go runtime for App Engine in the standard environment is\ndeclared in the [`app.yaml`](/appengine/docs/standard/go/configuring-your-app-with-app-yaml)\nfile: \n\n```yaml\nruntime: go\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e\n```\n\nWhere \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e is the Go `MAJOR` and `MINOR` version numbers. For\nexample, to use the latest Go version, Go 1.25, specify\n`125`.\n\nFor other supported Go versions, and the corresponding Ubuntu version for your\nGo version, see the [Runtime support schedule](/appengine/docs/standard/lifecycle/support-schedule#go).\n\nGo version\n----------\n\nThe latest supported Go version is 1.25. The Go runtime uses the latest stable release of the version that\nis specified in your `app.yaml` file. App Engine automatically updates to\nnew patch revisions, but won't automatically update the major version.\n\nFor example, your application might be deployed at the minor version Go 1.13.1\nand be automatically updated to version 1.13.2 at a later deployment, but it\nwon't be automatically updated to the major version Go 1.14.\n\nDependencies\n------------\n\nFor more information on declaring and managing dependencies, see [Specifying dependencies](/appengine/docs/standard/go/specifying-dependencies).\n\n\u003cbr /\u003e\n\nEnvironment variables\n---------------------\n\nThe following environment variables are set by the runtime:\n\nYou can\n[define additional environment variables in your `app.yaml` file](/appengine/docs/standard/reference/app-yaml#environment_variables),\nbut the above values cannot be overridden, except for `NODE_ENV`.\n\n\u003cbr /\u003e\n\nHTTPS and forwarding proxies\n----------------------------\n\nApp Engine terminates HTTPS connections at the load balancer and\nforwards requests to your application. Some applications need to determine\nthe original request IP and protocol. The user's IP address is available in\nthe standard `X-Forwarded-For` header. Applications that require this\ninformation should configure their web framework to trust the proxy.\n\n\u003cbr /\u003e\n\nFilesystem\n----------\n\nThe runtime includes a writable `/tmp` directory, with all other directories\nhaving read-only access. Writing to `/tmp` takes up system memory. For more\ninformation, see the [`TempDir`](https://golang.org/pkg/io/ioutil/#TempDir)\nand [`TempFile`](https://golang.org/pkg/io/ioutil/#TempFile)\ndocumentation.\n\n\u003cbr /\u003e\n\nMetadata server\n---------------\n\nEach instance of your application can use the App Engine metadata server\nto query information about the instance and your project.\n| **Note:** Custom metadata is not supported in the standard environment.\n\nYou can access the metadata server through the following endpoints:\n\n- `http://metadata`\n- `http://metadata.google.internal`\n\nRequests sent to the metadata server must include the request header\n`Metadata-Flavor: Google`. This header indicates that the request was sent with\nthe intention of retrieving metadata values.\n\nThe following table lists the endpoints where you can make HTTP requests for\nspecific metadata:\n\nFor example, to retrieve your project ID, send a request to\n`http://metadata.google.internal/computeMetadata/v1/project/project-id`.\n\n\u003cbr /\u003e"]]