{"id":10007080,"date":"2023-01-16T14:51:44","date_gmt":"2023-01-16T06:51:44","guid":{"rendered":"https:\/\/ityet.com\/?p=10007080"},"modified":"2023-01-16T14:51:44","modified_gmt":"2023-01-16T06:51:44","slug":"%e9%86%92%e9%86%92%e5%90%a7%ef%bc%8c%e6%9c%aa%e6%9d%a5%e4%b8%8d%e4%bc%9a%e6%9c%89-go2-%e4%ba%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10007080","title":{"rendered":"\u9192\u9192\u5427\uff0c\u672a\u6765\u4e0d\u4f1a\u6709 Go2 \u4e86\uff01"},"content":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u714e\u9c7c\u3002<\/p>\n<p>\u9a6c\u4e0a\u6625\u8282\u4e86\uff0c\u8282\u524d\u6700\u540e\u4e00\u66f4\u3002\u63d0\u524d\u9884\u795d\u5927\u5bb6\u6625\u8282\u5feb\u4e50\uff01<\/p>\n<p>\u672c\u5468\u672b\u5728\u5b66\u4e60\u7684\u65f6\u5019\uff0c\u770b\u5230 Go \u56e2\u961f\u5927\u5f53\u5bb6 Russ Cox\uff08\u4e0b\u79f0\uff1arsc\uff09\u5728\u8fd1\u671f\u5206\u4eab\u7684\u300a<a href=\"https:\/\/link.segmentfault.com\/?enc=7dwwMl17p1yyAsZgPHeSzA%3D%3D.Yz7NO8Msz9MO2fAxYe%2B0FSGYkAXeU1amzJmW4mUI8zBWNHq7Hp59t80WSHiy3pkI\" rel=\"nofollow\" title=\"GopherCon 2022: Russ Cox - Compatibility: How Go Programs Keep Working\">GopherCon 2022: Russ Cox &#8211; Compatibility: How Go Programs Keep Working<\/a>\u300b\uff0c\u8bb2\u7684\u662f Go \u5728\u517c\u5bb9\u6027\u65b9\u9762\u7684\u73b0\u6709\u95ee\u9898\u548c\u601d\u8003\uff0c\u8fd8\u57cb\u4e86\u4e2a\u65b0\u9884\u671f\u3002<\/p>\n<p>\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043338879\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u4ed6\u63d0\u51fa\u4e86\u4e00\u4e2a\u65b0\u7684 Slogan\uff1a\u201cGo is boring, and that&#8217;s good.\uff08Go \u5f88\u65e0\u804a\uff0c\u8fd9\u5f88\u597d\uff09\u201d\uff0c\u539f\u56e0\u5728\u4e8e Go \u65e0\u804a\u662f\u597d\u7684\uff0c\u56e0\u4e3a\u65e0\u804a\u4ee3\u8868\u7a33\u5b9a\u7684\u3002\u65e0\u804a\u610f\u5473\u7740\u4f60\u80fd\u591f\u4e13\u6ce8\u4e8e\u4f60\u7684\u5de5\u4f5c\uff0c\u800c\u4e0d\u662f\u6211\u4eec\u7684\u5de5\u4f5c\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043338880\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u6838\u5fc3\u6765\u8bb2\uff0cGo \u56e2\u961f\u5e0c\u671b Go \u8db3\u591f\u7b80\u6d01\uff0cGopher \u4e0d\u8981\u6574\u5929\u5377 Go \u7684\u5404\u79cd\u5947\u601d\u5999\u8ba1\uff0c\u8981\u628a\u7cbe\u529b\u90fd\u5173\u6ce8\u5230\u81ea\u5df1\u7684\u5de5\u4f5c\u4e0a\uff0c\u4e0d\u8981\u5173\u6ce8\u4ed6\u4eec\u3002<\/p>\n<p>\u6211\u4e00\u5f00\u59cb\u542c\u8d77\u6765\u591a\u5c11\u6709\u70b9\u9053\u7406\u548c\u81ea\u5df1\u7684\u60f3\u6cd5\uff0c\u542c\u7740\u542c\u7740\u8fd9\u4e2a\u8f66\u5c31\u5239\u4e0d\u4f4f\u4e86\u3002<\/p>\n<p>\u5728\u6700\u540e\u7684\u6700\u540e\uff0crsc \u51b7\u4e0d\u4e01\u7684\u6b63\u5f0f\u5b98\u5ba3\uff1a<strong>\u4e0d\u4f1a\u6709 Go2 \u4e86\uff0c\u4f1a\u4e00\u76f4\u4fdd\u6301 Go1\uff0c\u5c06\u4f1a\u52a0\u500d\u6295\u5165\u5bf9 Go1 \u517c\u5bb9\u6027\u7684\u5efa\u8bbe\uff0c\u8fd9\u5c06\u975e\u5e38\u6709\u4ef7\u503c<\/strong>\u3002 <\/p>\n<p>\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043338881\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5f53\u7136\uff0c\u4ed6\u4e5f\u8bb2\u4e86\uff0c\u72ed\u4e49\u91cc\u7684 Go2 \u53ef\u80fd\u5df2\u7ecf\u53d1\u751f\u4e86\uff0c\u53ea\u662f\u6162\u6162\u8f6c\u4e3a\u4e86 Go1 \u7684\u65b0\u7279\u6027\u878d\u5165\u5230\u4e86 Go \u4e4b\u4e2d\u3002<\/p>\n<p>\u6700\u91cd\u8981\u7684\uff0c\u90a3\u4e9b\u6ca1\u6cd5\u517c\u5bb9\u7684 \u201c\u65b0\u201d \u4e1c\u897f\u600e\u4e48\u529e\uff1f\u5927\u65b9\u5411\u7684\u5927\u62db\u5df2\u7ecf\u5728\u524d\u6587\u300a<a href=\"https:\/\/link.segmentfault.com\/?enc=zjmOnWM6H2TFlzcWV38R%2BQ%3D%3D.ehigg14g%2By5IU0U4gyV3rpvciz2%2FwS0RNkbb2PZQ%2B3nW2Hluk42Nkxk3XbtFOHTexdv%2FR1ssN5cLj35sl4Salg%3D%3D\" rel=\"nofollow\">\u52a0\u5927\u529b\u5ea6\uff01Go \u5c06\u4f1a\u589e\u5f3a Go1 \u5411\u540e\u517c\u5bb9\u6027<\/a>\u300b\u6709\u4ecb\u7ecd\u8fc7\u3002<\/p>\n<p>\u6838\u5fc3\u4e4b\u4e00\uff1a<strong>\u4f7f\u7528 Go \u5de5\u7a0b\u4e2d\u7684 go.mod \u6587\u4ef6\u5185\u7684 go \u7248\u672c\u53f7\u6765\u63a7\u5236\u7f16\u8bd1<\/strong>\u7684\u9009\u62e9\uff0c\u51b3\u5b9a\u5404\u4e2a\u5e93\u5728\u4e0d\u540c Go \u7248\u672c\u4e0b\u4ee5\u4e0d\u540c\u7684\u8868\u73b0\u6765\u5e94\u7528\u5176\u7279\u6027\uff0c\u5c06\u4f1a\u5f71\u54cd\u7f16\u8bd1\u65f6\u7684\u51b3\u5b9a\u3002<\/p>\n<p>\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000043338882\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<ul>\n<li>\u4e3b\u6a21\u5757\uff08main module)\uff1a\u58f0\u660e go \u7248\u672c\u662f 1.19\uff0c\u4ed6\u53ef\u4ee5\u4f7f\u7528\u6cdb\u578b\u548c\u5e26\u4e0b\u5212\u7ebf\u7684\u6570\u5b57\u3002<\/li>\n<li>\u6a21\u5757 A v1.0.0\uff1a\u58f0\u660e go \u7248\u672c\u662f 1.17\uff0c\u6a21\u5757 A \u91cc\u7684\u5305\u4e0d\u53ef\u4ee5\u4f7f\u7528\u6cdb\u578b\uff081.18 \u624d\u5f00\u59cb\u652f\u6301\uff09\uff0c\u5e26\u4e0b\u5212\u7ebf\u7684\u6570\u5b57\u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\u3002<\/li>\n<li>\u6a21\u5757 B v1.2.1\uff1a\u58f0\u660e go \u7248\u672c\u662f 1.12\uff0c\u4e24\u8005\u90fd\u4e0d\u80fd\u7528\u3002<\/li>\n<\/ul>\n<p>\u5728\u4e0a\u8ff0\u8bf4\u660e\u4e2d\uff0c\u4e3b\u6a21\u5757\u3001\u6a21\u5757 A\u3001\u6a21\u5757 B\uff0c\u5206\u522b\u6839\u636e go.mod \u5185\u7684 go \u7248\u672c\u53f7\uff0c\u5e94\u7528\u5230\u4e86\u4e0d\u540c\u7684\u53ef\u7528\u7279\u6027\uff08\u6709\u7684\u53ef\u4ee5\u7528\u6cdb\u578b\uff0c\u6709\u7684\u4e0d\u53ef\u4ee5\u7528\u5e26\u4e0b\u5212\u7ebf\u7684\u6570\u5b57\uff0c\u6709\u7684\u90fd\u4e0d\u80fd\u7528\u7b49\uff09\u3002<\/p>\n<p>\u8fd9\u672c\u8d28\u662f\u7ed3\u5408 Go modules \u539f\u672c\u7684\u4f9d\u8d56\u7ba1\u7406\u903b\u8f91\uff0c\u518d\u590d\u7528 go.mod \u7684 go \u7248\u672c\u53f7\u7ed9\u4e0d\u540c\u7248\u672c\u7684\u4e0d\u540c\u7279\u6027\u6765\u505a\u597d\u7f16\u8bd1\u7684\u63a7\u5236\u903b\u8f91\u3002<\/p>\n<p>\u672a\u6765\u5c06\u4e0d\u4f1a\u6709 Go2\uff0c\u90fd\u4f1a\u662f Go1.x\u3002<\/p>\n<p>\u5df2\u7ecf\u627e\u5230\u80fd\u5f80\u91cc\u5404\u79cd\u585e\u7684\u59ff\u52bf\u4e86\u3002<\/p>\n<blockquote><p>\u6587\u7ae0\u6301\u7eed\u66f4\u65b0\uff0c\u53ef\u4ee5\u5fae\u4fe1\u641c\u3010\u8111\u5b50\u8fdb\u714e\u9c7c\u4e86\u3011\u9605\u8bfb\uff0c\u672c\u6587 <strong>GitHub<\/strong> <a href=\"https:\/\/link.segmentfault.com\/?enc=hOdnh6hcRIumCCiZBctRLA%3D%3D.dZwkaSVKI0dxIKFZmFEheypiPbJhvB%2FvtsHixBWpXDs%3D\" rel=\"nofollow\">github.com\/eddycjy\/blog<\/a> \u5df2\u6536\u5f55\uff0c\u5b66\u4e60 Go \u8bed\u8a00\u53ef\u4ee5\u770b <a href=\"https:\/\/link.segmentfault.com\/?enc=LRYYtGbyovQPwETVIFlpaA%3D%3D.9yCszmOrZEKSkYA4NGQcVDLvs14EdXT9Zwgv3j9bnoZ18AjfKGQm2Ta7aC0orX%2Fj\" rel=\"nofollow\">Go \u5b66\u4e60\u5730\u56fe\u548c\u8def\u7ebf<\/a>\uff0c\u6b22\u8fce Star \u50ac\u66f4\u3002<\/p><\/blockquote>\n<h3>Go \u56fe\u4e66\u7cfb\u5217<\/h3>\n<ul>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=lzmPy60c79iUlYB9WV4sWw%3D%3D.3ad2rlPHjr7V96SNuE8FkkbszAnxPUQoyowJWat3sbRUKnWvrr4lVtJrkxtHEDye\" rel=\"nofollow\">Go \u8bed\u8a00\u5165\u95e8\u7cfb\u5217\uff1a\u521d\u63a2 Go \u9879\u76ee\u5b9e\u6218<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=9%2FpDB2Q3kkpihYF1dkhA3w%3D%3D.SFxKkKXev87XGlC32AtHfzdUpg2QdjC%2BFp4h%2BNSk9WE%3D\" rel=\"nofollow\">Go \u8bed\u8a00\u7f16\u7a0b\u4e4b\u65c5\uff1a\u6df1\u5165\u7528 Go \u505a\u9879\u76ee<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=C9FuLsEOgD0fJxI%2Boxmr%2FA%3D%3D.n7eXd60REd4mY1dzLIxPsMLpR0pAf%2FE92wmGJqaFjgI%3D\" rel=\"nofollow\">Go \u8bed\u8a00\u8bbe\u8ba1\u54f2\u5b66\uff1a\u4e86\u89e3 Go \u7684\u4e3a\u4ec0\u4e48\u548c\u8bbe\u8ba1\u601d\u8003<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=kB1UbjwmRfVL5ifpwn6pGg%3D%3D.F844MkHnUH7RRDboYy8rkzmsV4VcpCAcFXASgLcdVg4%3D\" rel=\"nofollow\">Go \u8bed\u8a00\u8fdb\u9636\u4e4b\u65c5\uff1a\u8fdb\u4e00\u6b65\u6df1\u5165 Go \u6e90\u7801<\/a><\/li>\n<\/ul>\n<h4>\u63a8\u8350\u9605\u8bfb<\/h4>\n<ul>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=R0rkN0ze3lVU3yEeATM%2BqA%3D%3D.PgRhdJBrQQQAmq3eupiVer4ZthitG4y6Nf3VWV4tQ0MEKtVnVsZ6X5AhiBffZdywRcB6XzRTyZPzalP0mNK%2BWQ%3D%3D\" rel=\"nofollow\">Go1.20 \u4e2d\u4e24\u4e2a\u5173\u4e8e Time \u7684\u66f4\u65b0\uff0c\u7ec8\u4e8e\u4e0d\u7528\u80cc 2006-01-02 15:04:05 \u4e86\uff01<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=z%2BFP79z1%2BpVJ8LhpChZQ4Q%3D%3D.lksZEW%2B0a5FxIWDKj5Z4ZCuS2c9xYvkSaDndVPg4mUrU8TWmirUXj7fXB2aZWt5s9uozWtbC1NAwM05O5Op0lw%3D%3D\" rel=\"nofollow\">\u6253\u8138\u4e86\u5144\u5f1f\u4eec\uff0cGo1.20 arena \u6765\u4e86\uff01<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=VgxpayBu7rXgVwfQ9zURKw%3D%3D.pwj7DHFfIuqcsc%2BaDi7DNdNxUN86QzmpMRPmAgII5Fhfcv4Z6a0FeDJXGkEl0JV%2F6jC4dlYk6%2Bw%2BzskCGenFow%3D%3D\" rel=\"nofollow\">Go \u5341\u5e74\u4e86\uff0c\u7ec8\u4e8e\u60f3\u8d77\u8981\u7edf\u4e00 log \u5e93\u4e86\uff01<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000043338877\">https:\/\/segmentfault.com\/a\/1190000043338877<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662f\u714e\u9c7c\u3002 \u9a6c\u4e0a\u6625\u8282\u4e86\uff0c\u8282\u524d\u6700\u540e\u4e00\u66f4\u3002\u63d0\u524d\u9884\u795d\u5927\u5bb6\u6625\u8282\u5feb\u4e50\uff01 \u672c\u5468\u672b\u5728\u5b66\u4e60\u7684\u65f6\u5019\uff0c\u770b\u5230 Go \u56e2\u961f\u5927\u5f53 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10007080","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10007080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10007080"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10007080\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10007080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10007080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10007080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}