{"id":44169,"date":"2023-12-10T22:26:26","date_gmt":"2023-07-04T13:27:51","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/"},"modified":"2024-05-04T13:00:23","modified_gmt":"2024-05-04T05:00:23","slug":"%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/","title":{"rendered":"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09"},"content":{"rendered":"<p>\u4f60\u597d\u3002<\/p>\n<p>\u7b2c\u4e8c\u90e8\u5206\u8bb2\u8ff0\u4e86\u5173\u4e8e\u51c6\u5907\u5de5\u4f5c\uff08Go\uff09\u7684\u5185\u5bb9\u3002<\/p>\n<h1>\u76ee\u6807<\/h1>\n<p>\u8fd9\u6b21\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2aGo\u7684\u70ed\u91cd\u8f7d\u73af\u5883\u3002<br \/>\n(\u70ed\u91cd\u8f7d\u662f\u6307\u81ea\u52a8\u5c06\u4ee3\u7801\u66f4\u6539\u5e94\u7528\u5230\u5e94\u7528\u7a0b\u5e8f\u4e2d\u7684\u529f\u80fd\u3002)<\/p>\n<p>\u7531\u4e8e\u6ca1\u6709\u7f16\u5199\u6d4b\u8bd5\u4ee3\u7801\uff0c\u4e3a\u4e86\u65b9\u4fbf\u786e\u8ba4\u66f4\u6539\uff0c\u6211\u5e0c\u671b\u80fd\u591f\u6784\u5efa\u4e00\u4e2a\u70ed\u52a0\u8f7d\u73af\u5883\u3002<\/p>\n<h1>\u51c6\u5907<\/h1>\n<ul class=\"post-ul\">go\u306e\u30d0\u30fc\u30b8\u30e7\u30f3<\/ul>\n<pre class=\"post-pre\"><code>% go version\r\ngo version go1.20.6 darwin\/amd64\r\n<\/code><\/pre>\n<p>\u5728\u76ee\u5f55\u4e2d\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>% go mod init login-example \r\ngo: creating new go.mod: module login-example\r\n<\/code><\/pre>\n<p>\u6211\u4e5f\u9700\u8981\u4e0b\u8f09echo\u3002<\/p>\n<pre class=\"post-pre\"><code>go get github.com\/labstack\/echo\/v4 \r\ngo: downloading github.com\/labstack\/echo\/v4 v4.11.1\r\ngo: downloading github.com\/labstack\/echo v3.3.10+incompatible\r\ngo: downloading github.com\/labstack\/gommon v0.4.0\r\ngo: downloading golang.org\/x\/crypto v0.11.0\r\ngo: downloading golang.org\/x\/net v0.12.0\r\ngo: downloading github.com\/mattn\/go-colorable v0.1.13\r\ngo: downloading github.com\/valyala\/fasttemplate v1.2.2\r\ngo: downloading github.com\/mattn\/go-isatty v0.0.19\r\ngo: downloading github.com\/valyala\/bytebufferpool v1.0.0\r\ngo: downloading golang.org\/x\/text v0.11.0\r\ngo: downloading golang.org\/x\/sys v0.10.0\r\ngo: added github.com\/labstack\/echo\/v4 v4.11.1\r\ngo: added github.com\/labstack\/gommon v0.4.0\r\ngo: added github.com\/mattn\/go-colorable v0.1.13\r\ngo: added github.com\/mattn\/go-isatty v0.0.19\r\ngo: added github.com\/valyala\/bytebufferpool v1.0.0\r\ngo: added github.com\/valyala\/fasttemplate v1.2.2\r\ngo: added golang.org\/x\/crypto v0.11.0\r\ngo: added golang.org\/x\/net v0.12.0\r\ngo: added golang.org\/x\/sys v0.10.0\r\ngo: added golang.org\/x\/text v0.11.0\r\n<\/code><\/pre>\n<p>\u521b\u5efa\u4e00\u4e2amain.go\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>package main\r\n\r\nimport (\r\n\t\"net\/http\"\r\n\r\n\t\"github.com\/labstack\/echo\/v4\"\r\n)\r\n\r\nfunc main() {\r\n\te := echo.New()\r\n\r\n\te.GET(\"\/\", func(c echo.Context) error {\r\n\t\treturn c.String(http.StatusOK, \"Hello, world!\\n\")\r\n\t})\r\n\r\n\te.Logger.Fatal(e.Start(\":8000\"))\r\n}\r\n<\/code><\/pre>\n<p>\u6211\u521b\u5efa\u4e86\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\uff0c\u5f53\u8bbf\u95eelocalhost:8000\u65f6\uff0c\u5b83\u4f1a\u7b80\u5355\u5730\u8fd4\u56de\u201c\u4f60\u597d\uff0c\u4e16\u754c\uff01\u201d\u3002<\/p>\n<h1>\u642d\u5efa\u70ed\u91cd\u8f7d\u73af\u5883<\/h1>\n<p>\u6211\u60f3\u642d\u5efa\u4e00\u4e2a\u70ed\u52a0\u8f7d\u73af\u5883\u3002\u8fd9\u6b21\u6211\u9009\u62e9\u4f7f\u7528air\u3002<\/p>\n<p>\u8ba9\u6211\u4eec\u521b\u5efaDockerfile\u3001docker-compose.yml\u548c.air.toml\u6587\u4ef6\u3002<\/p>\n<p>Dockerfile\u7684\u542b\u4e49\u662f\u4ec0\u4e48\uff1f<\/p>\n<pre class=\"post-pre\"><code>FROM golang:1.20.6\r\n\r\nWORKDIR \/app\r\n\r\nRUN go install github.com\/cosmtrek\/air@latest\r\n\r\nCMD [\"air\", \"-c\", \".air.toml\"]\r\n<\/code><\/pre>\n<p>docker-compose.yml \u6587\u4ef6<\/p>\n<pre class=\"post-pre\"><code>version: \"3.8\"\r\n\r\nservices:\r\n  api:\r\n    container_name: login-go-api\r\n    build:\r\n      dockerfile: Dockerfile\r\n      context: .\r\n    volumes:\r\n      - \".:\/app\"\r\n    ports:\r\n      - \"8000:8000\"\r\n<\/code><\/pre>\n<p>.air.toml<\/p>\n<p>\u7a7a\u6c14.toml<\/p>\n<pre class=\"post-pre\"><code># Config file for [Air](https:\/\/github.com\/cosmtrek\/air) in TOML format\r\n\r\n# Working directory\r\n# . or absolute path, please note that the directories following must be under root.\r\nroot = \".\"\r\ntmp_dir = \"tmp\"\r\n\r\n[build]\r\n# Just plain old shell command. You could use `make` as well.\r\ncmd = \"go build -o .\/tmp\/main .\"\r\n# Binary file yields from `cmd`.\r\nbin = \"tmp\/main\"\r\n# Customize binary, can setup environment variables when run your app.\r\nfull_bin = \"APP_ENV=dev APP_USER=air .\/tmp\/main\"\r\n# Watch these filename extensions.\r\ninclude_ext = [\"go\", \"tpl\", \"tmpl\", \"html\"]\r\n# Ignore these filename extensions or directories.\r\nexclude_dir = [\"assets\", \"tmp\", \"vendor\", \"frontend\/node_modules\"]\r\n# Watch these directories if you specified.\r\ninclude_dir = []\r\n# Watch these files.\r\ninclude_file = []\r\n# Exclude files.\r\nexclude_file = []\r\n# Exclude specific regular expressions.\r\nexclude_regex = [\"_test\\\\.go\"]\r\n# Exclude unchanged files.\r\nexclude_unchanged = true\r\n# Follow symlink for directories\r\nfollow_symlink = true\r\n# This log file places in your tmp_dir.\r\nlog = \"air.log\"\r\n# Poll files for changes instead of using fsnotify.\r\npoll = false\r\n# Poll interval (defaults to the minimum interval of 500ms).\r\npoll_interval = 500 # ms\r\n# It's not necessary to trigger build each time file changes if it's too frequent.\r\ndelay = 0 # ms\r\n# Stop running old binary when build errors occur.\r\nstop_on_error = true\r\n# Send Interrupt signal before killing process (windows does not support this feature)\r\nsend_interrupt = false\r\n# Delay after sending Interrupt signal\r\nkill_delay = 500 # ms\r\n# Rerun binary or not\r\nrerun = false\r\n# Delay after each executions\r\nrerun_delay = 500\r\n# Add additional arguments when running binary (bin\/full_bin). Will run '.\/tmp\/main hello world'.\r\nargs_bin = [\"hello\", \"world\"]\r\n\r\n[log]\r\n# Show log time\r\ntime = false\r\n# Only show main log (silences watcher, build, runner)\r\nmain_only = false\r\n\r\n[color]\r\n# Customize each part's color. If no color found, use the raw app log.\r\nmain = \"magenta\"\r\nwatcher = \"cyan\"\r\nbuild = \"yellow\"\r\nrunner = \"green\"\r\n\r\n[misc]\r\n# Delete tmp directory on exit\r\nclean_on_exit = true\r\n\r\n[screen]\r\nclear_on_rebuild = true\r\nkeep_scroll = true\r\n<\/code><\/pre>\n<p>\u6211\u5df2\u7ecf\u5efa\u7acb\u4e86\u4e00\u4e2a\u70ed\u52a0\u8f7d\u73af\u5883\u3002<\/p>\n<h1>\u786e\u8ba4\u65b9\u5f0f<\/h1>\n<p>\u6211\u4eec\u5c06\u786e\u8ba4\u5b9e\u9645\u4e0a\u662f\u5426\u521b\u5efa\u4e86\u70ed\u91cd\u8f7d\u73af\u5883\u3002<\/p>\n<p>\u542f\u52a8\u5bb9\u5668\u3002<\/p>\n<pre class=\"post-pre\"><code>docker compose up\r\n<\/code><\/pre>\n<p>\u7136\u540e\u7ecf\u8fc7\u7a0d\u7b49\u65f6\u95f4\u540e\uff0c\u5e94\u8be5\u4f1a\u8f93\u51fa\u5982\u4e0b\uff1a<\/p>\n<pre class=\"post-pre\"><code> \u2714 Network go_default           Created                                    0.1s \r\n \u2714 Container login-example-api  Created                                    0.1s \r\nAttaching to login-example-api\r\nlogin-example-api  | \r\nlogin-example-api  |   __    _   ___  \r\nlogin-example-api  |  \/ \/\\  | | | |_) \r\nlogin-example-api  | \/_\/--\\ |_| |_| \\_ , built with Go \r\nlogin-example-api  | \r\nlogin-example-api  | mkdir \/app\/tmp\r\nlogin-example-api  | watching .\r\nlogin-example-api  | !exclude tmp\r\nlogin-example-api  | building...\r\nlogin-example-api  | go: downloading github.com\/labstack\/echo\/v4 v4.11.1\r\nlogin-example-api  | go: downloading github.com\/labstack\/gommon v0.4.0\r\nlogin-example-api  | go: downloading golang.org\/x\/crypto v0.11.0\r\nlogin-example-api  | go: downloading golang.org\/x\/net v0.12.0\r\nlogin-example-api  | go: downloading github.com\/valyala\/fasttemplate v1.2.2\r\nlogin-example-api  | go: downloading github.com\/mattn\/go-isatty v0.0.19\r\nlogin-example-api  | go: downloading github.com\/valyala\/bytebufferpool v1.0.0\r\nlogin-example-api  | go: downloading golang.org\/x\/sys v0.10.0\r\nlogin-example-api  | go: downloading golang.org\/x\/text v0.11.0\r\nlogin-example-api  | running...\r\nlogin-example-api  | \r\nlogin-example-api  |    ____    __\r\nlogin-example-api  |   \/ __\/___\/ \/  ___\r\nlogin-example-api  |  \/ _\/\/ __\/ _ \\\/ _ \\\r\nlogin-example-api  | \/___\/\\__\/_\/\/_\/\\___\/ v4.11.1\r\nlogin-example-api  | High performance, minimalist Go web framework\r\nlogin-example-api  | https:\/\/echo.labstack.com\r\nlogin-example-api  | ____________________________________O\/_______\r\nlogin-example-api  |                                     O\\\r\nlogin-example-api  | \u21e8 http server started on [::]:8000\r\n<\/code><\/pre>\n<p>\u73b0\u5728\uff0c\u6211\u4eec\u6765\u786e\u8ba4\u4e00\u4e0b\uff0c\u5982\u679c\u771f\u6b63\u4fee\u6539\u4e86\u4ee3\u7801\uff0c\u662f\u5426\u4f1a\u7acb\u5373\u53cd\u6620\u51fa\u6765\u3002<br \/>\n\u8bf7\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u7ec8\u7aef\uff0c\u5e76\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>curl localhost:8000\r\nHello, world! # \u3068\u51fa\u529b\u3055\u308c\u308c\u3070OK\r\n<\/code><\/pre>\n<p>\u73b0\u5728\uff0c\u70ed\u52a0\u8f7d\u73af\u5883\u5df2\u7ecf\u6210\u529f\u642d\u5efa\u5b8c\u6210\u3002<\/p>\n<h1>\u6982\u62ec<\/h1>\n<p>\u5f53\u524d\u7684\u76ee\u5f55\u770b\u8d77\u6765\u662f\u8fd9\u6837\u7684<\/p>\n<pre class=\"post-pre\"><code>.\r\n\u251c\u2500\u2500 .air.toml\r\n\u251c\u2500\u2500 Dockerfile\r\n\u251c\u2500\u2500 docker-compose.yml\r\n\u251c\u2500\u2500 go.mod\r\n\u251c\u2500\u2500 go.sum\r\n\u2514\u2500\u2500 main.go\r\n<\/code><\/pre>\n<p>\u4eca\u5929\u5c31\u8fd9\u6837\u5427\u3002\u8c22\u8c22\u3002<\/p>\n<p>\u6211\u5df2\u7ecf\u5c06\u4eca\u5929\u521b\u5efa\u7684\u5e94\u7528\u7a0b\u5e8f\u6dfb\u52a0\u5230GitHub\u4e0a\u3002<br \/>\n\u5982\u679c\u9700\u8981\uff0c\u8bf7\u70b9\u51fb\u6b64\u94fe\u63a5\u3002<\/p>\n<p>\u4e0b\u4e00\u4e2aPart 3\u662f\u51c6\u5907\uff08MySQL\u548cdocker-compose.yml\uff09\u3002<br \/>\n\u8c22\u8c22\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u597d\u3002 \u7b2c\u4e8c\u90e8\u5206\u8bb2\u8ff0\u4e86\u5173\u4e8e\u51c6\u5907\u5de5\u4f5c\uff08Go\uff09\u7684\u5185\u5bb9\u3002 \u76ee\u6807 \u8fd9\u6b21\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2aGo\u7684\u70ed\u91cd\u8f7d\u73af\u5883\u3002 (\u70ed\u91cd\u8f7d\u662f\u6307\u81ea [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-44169","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u4f7f\u7528\u3010go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09\" \/>\n<meta property=\"og:description\" content=\"\u4f60\u597d\u3002 \u7b2c\u4e8c\u90e8\u5206\u8bb2\u8ff0\u4e86\u5173\u4e8e\u51c6\u5907\u5de5\u4f5c\uff08Go\uff09\u7684\u5185\u5bb9\u3002 \u76ee\u6807 \u8fd9\u6b21\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2aGo\u7684\u70ed\u91cd\u8f7d\u73af\u5883\u3002 (\u70ed\u91cd\u8f7d\u662f\u6307\u81ea [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u4f7f\u7528\u3010go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-04T13:27:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T05:00:23+00:00\" \/>\n<meta name=\"author\" content=\"\u6e05, \u5b87\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u6e05, \u5b87\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/\",\"name\":\"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-07-04T13:27:51+00:00\",\"dateModified\":\"2024-05-04T05:00:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\",\"name\":\"\u6e05, \u5b87\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g\",\"caption\":\"\u6e05, \u5b87\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u4f7f\u7528\u3010go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09","og_description":"\u4f60\u597d\u3002 \u7b2c\u4e8c\u90e8\u5206\u8bb2\u8ff0\u4e86\u5173\u4e8e\u51c6\u5907\u5de5\u4f5c\uff08Go\uff09\u7684\u5185\u5bb9\u3002 \u76ee\u6807 \u8fd9\u6b21\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2aGo\u7684\u70ed\u91cd\u8f7d\u73af\u5883\u3002 (\u70ed\u91cd\u8f7d\u662f\u6307\u81ea [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5c1d\u8bd5\u4f7f\u7528\u3010go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-07-04T13:27:51+00:00","article_modified_time":"2024-05-04T05:00:23+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/","name":"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-07-04T13:27:51+00:00","dateModified":"2024-05-04T05:00:23+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5c1d\u8bd5\u4f7f\u7528\u3010Go\u3011\u7f16\u5199\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f\u7684\u767b\u5f55\u529f\u80fd\uff082\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e","name":"\u6e05, \u5b87","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b2016c18459a605fc469c7566608f5686491baa112d0871ee613f61b7210565?s=96&d=mm&r=g","caption":"\u6e05, \u5b87"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/qingyu\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%b0%9d%e8%af%95%e4%bd%bf%e7%94%a8%e3%80%90go%e3%80%91%e7%bc%96%e5%86%99%e7%bd%91%e7%bb%9c%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f%e7%9a%84%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%ef%bc%882%ef%bc%89\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=44169"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44169\/revisions"}],"predecessor-version":[{"id":98467,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44169\/revisions\/98467"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=44169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=44169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=44169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}