{"id":4951,"date":"2020-04-04T17:38:03","date_gmt":"2020-04-04T09:38:03","guid":{"rendered":"https:\/\/www.xttblog.com\/?p=4951"},"modified":"2020-04-09T10:01:13","modified_gmt":"2020-04-09T02:01:13","slug":"go-%e7%a8%8b%e5%ba%8f%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=4951","title":{"rendered":"go \u7a0b\u5e8f\u5e38\u89c1\u95ee\u9898"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">1.\u5411\u4e00\u4e2a\u5df2\u7ecf\u5173\u95ed\u7684\u901a\u9053\u53d1\u9001\u6570\u636e\u4f1a\u5bfc\u81f4\u5f02\u5e38,\u53ef\u4ee5\u901a\u8fc7defer \u8fdb\u884c\u5f02\u5e38\u6355\u6349:  <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>defer func(){\n\t if r := recover(); r != nil{\n\t     logrus.Errorln(\"Exceptin:\", string(debug.Stack()), r );\n\t }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u7ec8\u4f1a\u9020\u6210\u7a0b\u5e8f\u5d29\u6e83\uff0c\u672c\u6587\u662f\u7f51\u53cb\u7279\u9080\u53d1\u5e03\uff01<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=4951\">go \u7a0b\u5e8f\u5e38\u89c1\u95ee\u9898<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>1.\u5411\u4e00\u4e2a\u5df2\u7ecf\u5173\u95ed\u7684\u901a\u9053\u53d1\u9001\u6570\u636e\u4f1a\u5bfc\u81f4\u5f02\u5e38,\u53ef\u4ee5\u901a\u8fc7defer \u8fdb\u884c\u5f02\u5e38\u6355\u6349: \u6700\u7ec8\u4f1a\u9020\u6210\u7a0b\u5e8f\u5d29\u6e83\uff0c\u672c\u6587\u662f\u7f51\u53cb [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[740,2101,1942,1654,567],"class_list":["post-4951","post","type-post","status-publish","format-standard","hentry","category-yyzt","tag-alphago","tag-defer","tag-goaccess","tag-go","tag-java-"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4951"}],"version-history":[{"count":3,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4951\/revisions"}],"predecessor-version":[{"id":4956,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/4951\/revisions\/4956"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}