{"id":7941,"date":"2024-03-28T16:08:41","date_gmt":"2024-03-28T08:08:41","guid":{"rendered":"https:\/\/white-night.club\/?p=7941"},"modified":"2024-03-28T16:10:03","modified_gmt":"2024-03-28T08:10:03","slug":"blog72","status":"publish","type":"post","link":"https:\/\/white-night.club\/index.php\/2024\/03\/28\/blog72\/","title":{"rendered":"\u901a\u8fc7bat\u521b\u5efago\u9879\u76ee"},"content":{"rendered":"\n<p>\u4e3b\u8981\u662f\u6709\u65f6\u5019\u60f3\u5feb\u901f\u9a8c\u8bc1xxx\u601d\u8def\u6216\u8005\u7b97\u6cd5\u7684\u65f6\u5019\uff0cvscode\u5fc5\u987b\u5148\u521b\u5efa\u4e00\u4e2amain.go\uff0c\u518d\u5728\u547d\u4ee4\u884cinit\u5b83\u3002\u6bd4\u8f83\u9ebb\u70e6\uff0c\u4e0d\u5982\u76f4\u63a5\u5199\u4e2abat\u4e00\u6b65\u641e\u5b9a\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">BAT (Batchfile)<\/span><span role=\"button\" tabindex=\"0\" data-code=\"SET filename=main.go\n\necho. &gt; %filename%\n\ngo mod init main.go\n\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">SET<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">filename<\/span><span style=\"color: #D4D4D4\">=main.go<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">echo<\/span><span style=\"color: #D4D4D4\">. &gt; <\/span><span style=\"color: #9CDCFE\">%filename%<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">go mod init main.go<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u672c\u6765\u8fd8\u60f3\u987a\u4fbf\u521d\u59cb\u5316\u4e2ahello world\uff0c\u4f46\u662fbat\u5bf9\u201c\u5c06\u6807\u70b9\u7b26\u53f7\u5199\u5165\u6587\u4ef6\u201d\u7684\u8fd9\u4e2a\u529f\u80fd\uff0c\u8c8c\u4f3c\u4e0d\u592a\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5feb\u901f\u9a8c\u8bc1\u65f6\u4f7f\u7528<\/p>\n","protected":false},"author":1,"featured_media":7504,"comment_status":"open","ping_status":"","sticky":false,"template":"base","format":"standard","meta":{"footnotes":""},"categories":[14,12],"tags":[34,11],"_links":{"self":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/7941"}],"collection":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/comments?post=7941"}],"version-history":[{"count":0,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/7941\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media\/7504"}],"wp:attachment":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media?parent=7941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/categories?post=7941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/tags?post=7941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}