{"id":44530,"date":"2023-08-16T16:18:11","date_gmt":"2024-01-06T17:38:52","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/"},"modified":"2024-04-30T18:48:51","modified_gmt":"2024-04-30T10:48:51","slug":"ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/","title":{"rendered":"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355"},"content":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662ferukiti\u3002\u6211\u6b63\u5728\u5236\u4f5c\u6211\u6700\u559c\u6b22\u7684Golang\u3001ES2015\uff08Node.js\uff09\u548c\u6211\u5fc3\u7075\u7684\u6545\u4e61Ruby\u7684\u6bd4\u8f83\u5f62\u5f0f\u7684\u5907\u5fd8\u5f55\u3002\u559c\u6b22Ruby\u3001Golang\u548cJavaScript\u7684\u4eba\uff0c\u4ee5\u53ca\u540c\u65f6\u4f7f\u7528\u5b83\u4eec\u800c\u611f\u5230\u6df7\u4e71\u7684\u4eba\uff0c\u8bf7\u52a1\u5fc5\u4f7f\u7528\u6b64\u5907\u5fd8\u5f55\u3002\u7531\u4e8e\u4e00\u6b21\u6027\u5b8c\u6210\u5f88\u8f9b\u82e6\uff0c\u6211\u5c06\u5728\u6b64URL\u9010\u6b65\u5236\u4f5c\u3002\u6211\u4f1a\u5c06\u66f4\u65b0\u53d1\u9001\u7ed9\u6536\u85cf\u4e86\u8fd9\u4e2a\u5907\u5fd8\u5f55\u7684\u4eba\u3002<\/p>\n<h2>\u6587\u672c\u4e32<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)\u6587\u5b57\u5217\u9577\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/length.html\" target=\"_blank\" rel=\"nofollow noopener\">String#length<\/a><a href=\"https:\/\/golang.org\/pkg\/builtin\/#len\" target=\"_blank\" rel=\"nofollow noopener\">len(str)<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/length\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.length<\/a>\u5927\u5c0f\u6bd4\u8f03<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/=3c=3d=3e.html\" target=\"_blank\" rel=\"nofollow noopener\">String#&lt;=&gt;<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#Compare\" target=\"_blank\" rel=\"nofollow noopener\">strings.Compare()<\/a><br \/>\n\u5148\u982d\u6bd4\u8f03<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/class\/String.html#I_START_WITH--3F\" target=\"_blank\" rel=\"nofollow noopener\">String#start_with?<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#HasPrefix\" target=\"_blank\" rel=\"nofollow noopener\">strings.HasPrefix<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/startsWith\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.startsWith()<\/a>\u672b\u5c3e\u6bd4\u8f03<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/end_with=3f.html\" target=\"_blank\" rel=\"nofollow noopener\">String#end_with?<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#HasSuffix\" target=\"_blank\" rel=\"nofollow noopener\">strings.HasSuffix<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/endsWith\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.endsWith()<\/a>\u4efb\u610f\u6587\u5b57\u3067\u306e\u5206\u5272<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/split.html\" target=\"_blank\" rel=\"nofollow noopener\">String#split<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#Split\" target=\"_blank\" rel=\"nofollow noopener\">strings.Split()<\/a>, <a href=\"https:\/\/golang.org\/pkg\/regexp\/#Regexp.Split\" target=\"_blank\" rel=\"nofollow noopener\">regexp.Split()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/split\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.split()<\/a>\u7a7a\u767d\u6587\u5b57\u3067\u306e\u5206\u5272<br \/>\n<a href=\"https:\/\/golang.org\/pkg\/strings\/#Fields\" target=\"_blank\" rel=\"nofollow noopener\">strings.Fields<\/a><br \/>\n\u6587\u5b57\u5217\u914d\u5217\u306e\u7d50\u5408<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/join.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#join<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#Join\" target=\"_blank\" rel=\"nofollow noopener\">strings.Join()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/join\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.join()<\/a>\u90e8\u5206\u6587\u5b57\u5217<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/=5b=5d.html\" target=\"_blank\" rel=\"nofollow noopener\">str[start..end]<\/a>str[start:end]<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/substr\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.substr()<\/a>\u7e70\u308a\u8fd4\u3057<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.3.0\/method\/String\/i\/=2a.html\" target=\"_blank\" rel=\"nofollow noopener\">String#*<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#Repeat\" target=\"_blank\" rel=\"nofollow noopener\">strings.Repeat()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/repeat\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.repeat()<\/a>\u7f6e\u63db<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/tr.html\" target=\"_blank\" rel=\"nofollow noopener\">String#tr<\/a>, <a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/tr=21.html\" target=\"_blank\" rel=\"nofollow noopener\">String#tr!<\/a>, <a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/gsub.html\" target=\"_blank\" rel=\"nofollow noopener\">String#gsub<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#Replace\" target=\"_blank\" rel=\"nofollow noopener\">strings.Replace()<\/a>, <a href=\"https:\/\/golang.org\/pkg\/regexp\/#Regexp.ReplaceAllString\" target=\"_blank\" rel=\"nofollow noopener\">regexp.ReplaceAllString()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/replace\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.replace()<\/a>\u5305\u542b\u5224\u5b9a<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/include=3f.html\" target=\"_blank\" rel=\"nofollow noopener\">String#include?<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#Contains\" target=\"_blank\" rel=\"nofollow noopener\">strings.Contains()<\/a><br \/>\n\u524d\u5f8c\u306e\u7a7a\u767d\u9664\u53bb<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/strip.html\" target=\"_blank\" rel=\"nofollow noopener\">String#strip<\/a><a href=\"https:\/\/golang.org\/pkg\/strings\/#TrimSpace\" target=\"_blank\" rel=\"nofollow noopener\">strings.TrimSpace()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/String\/Trim\" target=\"_blank\" rel=\"nofollow noopener\">String.prototype.trim()<\/a>\u524d\u5f8c\u306e\u4efb\u610f\u6587\u5b57\u9664\u53bb<br \/>\n<a href=\"https:\/\/golang.org\/pkg\/strings\/#Trim\" target=\"_blank\" rel=\"nofollow noopener\">strings.Trim()<\/a><br \/>\n\u672b\u5c3e\u6539\u884c\u524a\u9664<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/chomp.html\" target=\"_blank\" rel=\"nofollow noopener\">String#chomp<\/a>, <a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/chomp=21.html\" target=\"_blank\" rel=\"nofollow noopener\">String#chomp!<\/a><\/p>\n<p>\u57cb\u3081\u8fbc\u307f\u6587\u5b57\u5217<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/doc\/spec=2fliteral.html#string\" target=\"_blank\" rel=\"nofollow noopener\">&#8220;#{hoge}&#8221;<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/template_strings\" target=\"_blank\" rel=\"nofollow noopener\">`${hoge}`<\/a>\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Kernel\/m\/sprintf.html\" target=\"_blank\" rel=\"nofollow noopener\">Kernle.#sprintf<\/a>, <a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/String\/i\/=25.html\" target=\"_blank\" rel=\"nofollow noopener\">String % args<\/a><a href=\"https:\/\/golang.org\/pkg\/fmt\/#Sprintf\" target=\"_blank\" rel=\"nofollow noopener\">fmt.Sprintf()<\/a><br \/>\n\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u51fa\u529b<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Kernel\/m\/printf.html\" target=\"_blank\" rel=\"nofollow noopener\">Kernle.#printf<\/a><a href=\"https:\/\/golang.org\/pkg\/fmt\/#Printf\" target=\"_blank\" rel=\"nofollow noopener\">fmt.Printf()<\/a><br \/>\n\u6a19\u6e96\u51fa\u529b<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Kernel\/m\/print.html\" target=\"_blank\" rel=\"nofollow noopener\">Kernel.#print<\/a><a href=\"https:\/\/golang.org\/pkg\/fmt\/#Print\" target=\"_blank\" rel=\"nofollow noopener\">fmt.Print()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_stdout\" target=\"_blank\" rel=\"nofollow noopener\">process.stdout.write()<\/a>\u6a19\u6e96\u51fa\u529b(\u6539\u884c)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Kernel\/m\/puts.html\" target=\"_blank\" rel=\"nofollow noopener\">Kernel.#puts<\/a><a href=\"https:\/\/golang.org\/pkg\/fmt\/#Println\" target=\"_blank\" rel=\"nofollow noopener\">fmt.Println()<\/a><a href=\"https:\/\/nodejs.org\/api\/console.html#console_console_log_data\" target=\"_blank\" rel=\"nofollow noopener\">console.log()<\/a>, <a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_stdout\" target=\"_blank\" rel=\"nofollow noopener\">process.stdout.write()<\/a>\u5909\u6570\u30c0\u30f3\u30d7<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Kernel\/m\/p.html\" target=\"_blank\" rel=\"nofollow noopener\">Kernel.#p<\/a><a href=\"https:\/\/golang.org\/pkg\/fmt\/#Sprintf\" target=\"_blank\" rel=\"nofollow noopener\">fmt.Printf(&#8220;%v\\n&#8221;, obj)<\/a><a href=\"https:\/\/nodejs.org\/api\/console.html#console_console_dir_obj_options\" target=\"_blank\" rel=\"nofollow noopener\">console.dir()<\/a>\u30d0\u30a4\u30c8\u5217\u3078\u306e\u5909\u63db\u4e0d\u8981[]byte(string)<a href=\"https:\/\/nodejs.org\/api\/buffer.html#buffer_new_buffer_str_encoding\" target=\"_blank\" rel=\"nofollow noopener\">new Buffer()<\/a>\u30d0\u30a4\u30c8\u5217\u304b\u3089\u306e\u5909\u63db\u4e0d\u8981string(bytes)<a href=\"https:\/\/nodejs.org\/api\/buffer.html#buffer_buf_tostring_encoding_start_end\" target=\"_blank\" rel=\"nofollow noopener\">buf.toString()<\/a><\/div>\n<\/div>\n<h2>\u987a\u5e8f\u6392\u5217<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)\u914d\u5217\u306e\u7d50\u5408<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/=2b.html\" target=\"_blank\" rel=\"nofollow noopener\">self += other<\/a><a href=\"https:\/\/golang.org\/pkg\/builtin\/#append\" target=\"_blank\" rel=\"nofollow noopener\">slice = append(slice, other&#8230;)<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/concat\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.concat()<\/a>\u5185\u5bb9\u306e\u30af\u30ea\u30a2<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/clear.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#clear<\/a><\/p>\n<p>\u8981\u7d20\u3067\u57cb\u3081\u308b<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/fill.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#fill<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/fill\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.fill()<\/a>\u30d5\u30a3\u30eb\u30bf<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/keep_if.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#keep_if<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/filter\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.filter()<\/a>\u5404\u8981\u7d20\u3092\u51e6\u7406(each)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/each.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#each<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/forEach\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.forEach()<\/a>, <a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/map\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.map()<\/a>\u6307\u5b9a\u8981\u7d20\u3092\u542b\u3080\uff1f<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/include=3f.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#include?<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/includes\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.includes()<\/a>\u6307\u5b9a\u8981\u7d20\u306e\u6700\u521d\u306e\u4f4d\u7f6e<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/find_index.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#find_index<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/findIndex\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.findIndex()<\/a>\u6307\u5b9a\u8981\u7d20\u306e\u6700\u5f8c\u306e\u4f4d\u7f6e<\/p>\n<p><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/lastIndexOf\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.lastIndexOf()<\/a>\u5148\u982d\u306b\u8981\u7d20\u8ffd\u52a0(unshift)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/unshift.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#unshift<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/unshift\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.unshift()<\/a>\u672b\u5c3e\u306b\u8981\u7d20\u8ffd\u52a0(push)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/push.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#push<\/a>, <a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/=2b.html\" target=\"_blank\" rel=\"nofollow noopener\">self += other<\/a><a href=\"https:\/\/golang.org\/pkg\/builtin\/#append\" target=\"_blank\" rel=\"nofollow noopener\">slice = append(slice, elem)<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/push\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.push()<\/a>\u672b\u5c3e\u304b\u3089\u8981\u7d20\u524a\u9664(pop)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/pop.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#pop<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/pop\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.pop()<\/a>\u305f\u305f\u307f\u8fbc\u307f(reduce)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Enumerable\/i\/inject.html\" target=\"_blank\" rel=\"nofollow noopener\">Enumerable#inject<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/reduce\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.reduce()<\/a>, <a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/reduceRight\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.reduceRight()<\/a>\u30ea\u30d0\u30fc\u30b9<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/reverse.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#reverse<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/reverse\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.reverse()<\/a>\u5148\u982d\u304b\u3089\u8981\u7d20\u524a\u9664(shift)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/shift.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#shift<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/shift\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.shift()<\/a>\u30bd\u30fc\u30c8<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Array\/i\/sort.html\" target=\"_blank\" rel=\"nofollow noopener\">Array#sort<\/a><br \/>\n<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Array\/sort\" target=\"_blank\" rel=\"nofollow noopener\">Array.prototype.sort()<\/a><\/div>\n<\/div>\n<h2>\u9032\u7a0b<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)CLI\u5f15\u6570(\u5f15\u6570\u306e\u307f)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Object\/c\/ARGV.html\" target=\"_blank\" rel=\"nofollow noopener\">Object::ARGV<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#pkg-variables\" target=\"_blank\" rel=\"nofollow noopener\">os.Args[1:]<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_argv\" target=\"_blank\" rel=\"nofollow noopener\">process.argv[2..]<\/a>CLI\u5f15\u6570(\u81ea\u5206\u81ea\u8eab\u306e\u540d\u524d)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/doc\/spec=2fvariables.html#pseudo\" target=\"_blank\" rel=\"nofollow noopener\">__FILE__<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#pkg-variables\" target=\"_blank\" rel=\"nofollow noopener\">os.Args[0]<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_argv\" target=\"_blank\" rel=\"nofollow noopener\">process.argv[1]<\/a>\u74b0\u5883\u5909\u6570<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/class\/ENV.html\" target=\"_blank\" rel=\"nofollow noopener\">ENV<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Getenv\" target=\"_blank\" rel=\"nofollow noopener\">os.Getenv()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_env\" target=\"_blank\" rel=\"nofollow noopener\">process.env<\/a>\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Dir\/s\/getwd.html\" target=\"_blank\" rel=\"nofollow noopener\">Dir.getwd<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Getwd\" target=\"_blank\" rel=\"nofollow noopener\">os.Getwd()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_cwd\" target=\"_blank\" rel=\"nofollow noopener\">process.cwd()<\/a>\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Dir\/s\/home.html\" target=\"_blank\" rel=\"nofollow noopener\">Dir.home<\/a><br \/>\n<a href=\"https:\/\/nodejs.org\/api\/os.html#os_os_homedir\" target=\"_blank\" rel=\"nofollow noopener\">os.homedir()<\/a>\u30db\u30b9\u30c8\u540d\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Socket\/s\/gethostname.html\" target=\"_blank\" rel=\"nofollow noopener\">Socket.gethostname<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Hostname\" target=\"_blank\" rel=\"nofollow noopener\">os.Hostname()<\/a><a href=\"https:\/\/nodejs.org\/api\/os.html#os_os_hostname\" target=\"_blank\" rel=\"nofollow noopener\">os.hostname()<\/a>PID\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.1.0\/method\/Process\/m\/pid.html\" target=\"_blank\" rel=\"nofollow noopener\">Process.#pid<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Getgid\" target=\"_blank\" rel=\"nofollow noopener\">os.Getpid()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_pid\" target=\"_blank\" rel=\"nofollow noopener\">process.pid<\/a>OS\u540d\u53d6\u5f97<br \/>\n<a href=\"https:\/\/golang.org\/pkg\/runtime\/#pkg-constants\" target=\"_blank\" rel=\"nofollow noopener\">runtime.GOOS<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_platform\" target=\"_blank\" rel=\"nofollow noopener\">process.platform<\/a>\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u540d\u53d6\u5f97<br \/>\n<a href=\"https:\/\/golang.org\/pkg\/runtime\/#pkg-constants\" target=\"_blank\" rel=\"nofollow noopener\">runtime.GOARCH<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_arch\" target=\"_blank\" rel=\"nofollow noopener\">process.arch<\/a>\u8a00\u8a9e\u30d0\u30fc\u30b8\u30e7\u30f3\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Object\/c\/RUBY_VERSION.html\" target=\"_blank\" rel=\"nofollow noopener\">Object::RUBY_VERSION<\/a><a href=\"https:\/\/golang.org\/pkg\/runtime\/#Version\" target=\"_blank\" rel=\"nofollow noopener\">runtime.Version()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_version\" target=\"_blank\" rel=\"nofollow noopener\">process.version<\/a>\u7d42\u4e86<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/class\/Kernel.html#M_EXIT\" target=\"_blank\" rel=\"nofollow noopener\">kernel.#exit<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Exit\" target=\"_blank\" rel=\"nofollow noopener\">os.Exit()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_exit_code\" target=\"_blank\" rel=\"nofollow noopener\">process.exit()<\/a>\u7570\u5e38\u7d42\u4e86(\u30b3\u30a2)<br \/>\n<a href=\"https:\/\/golang.org\/pkg\/builtin\/#panic\" target=\"_blank\" rel=\"nofollow noopener\">panic()<\/a><a href=\"https:\/\/nodejs.org\/api\/process.html#process_process_abort\" target=\"_blank\" rel=\"nofollow noopener\">process.abort()<\/a><\/div>\n<\/div>\n<h3>\u5b50\u8fdb\u7a0b<\/h3>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)\u5b50\u30d7\u30ed\u30bb\u30b9\u5b9f\u884c\uff06\u7d50\u679c\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/doc\/spec=2fliteral.html#command\" target=\"_blank\" rel=\"nofollow noopener\">`hoge`<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/exec\/#Command\" target=\"_blank\" rel=\"nofollow noopener\">exec.Command()<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/exec\/#Cmd.Output\" target=\"_blank\" rel=\"nofollow noopener\">.Output()<\/a><a href=\"https:\/\/nodejs.org\/api\/child_process.html#child_process_child_process_exec_command_options_callback\" target=\"_blank\" rel=\"nofollow noopener\">child_process.exec()<\/a><\/div>\n<\/div>\n<h2>\u6587\u4ef6\u7cfb\u7edf<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)\u4e00\u62ec\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u51fa\u3057<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/IO\/i\/read.html\" target=\"_blank\" rel=\"nofollow noopener\">IO.read()<\/a><a href=\"https:\/\/golang.org\/pkg\/io\/ioutil\/#ReadFile\" target=\"_blank\" rel=\"nofollow noopener\">ioutil.ReadFile()<\/a><a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_readfile_file_options_callback\" target=\"_blank\" rel=\"nofollow noopener\">fs.readFile()<\/a>, <a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_readfilesync_file_options\" target=\"_blank\" rel=\"nofollow noopener\">fs.readFileSync()<\/a>\u4e00\u62ec\u30d5\u30a1\u30a4\u30eb\u66f8\u304d\u51fa\u3057<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/IO\/s\/write.html\" target=\"_blank\" rel=\"nofollow noopener\">IO.write()<\/a><a href=\"https:\/\/golang.org\/pkg\/io\/ioutil\/#WriteFile\" target=\"_blank\" rel=\"nofollow noopener\">ioutil.WriteFile()<\/a><a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_writefile_file_data_options_callback\" target=\"_blank\" rel=\"nofollow noopener\">fs.writeFile()<\/a>, <a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_writefilesync_file_data_options\" target=\"_blank\" rel=\"nofollow noopener\">fs.writeFileSync()<\/a>\u30d5\u30a1\u30a4\u30eb\u5b58\u5728\u78ba\u8a8d<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/FileTest\/m\/exist=3f.html\" target=\"_blank\" rel=\"nofollow noopener\">FileTest.#exist?<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Stat\" target=\"_blank\" rel=\"nofollow noopener\">os.Stat()<\/a> &amp; <a href=\"https:\/\/golang.org\/pkg\/os\/#IsExist\" target=\"_blank\" rel=\"nofollow noopener\">os.IsExist()<\/a><a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_stat_path_callback\" target=\"_blank\" rel=\"nofollow noopener\">fs.stat()<\/a>, <a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_statsync_path\" target=\"_blank\" rel=\"nofollow noopener\">fs.statSync()<\/a>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Dir\/s\/mkdir.html\" target=\"_blank\" rel=\"nofollow noopener\">Dir.mkdir<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Mkdir\" target=\"_blank\" rel=\"nofollow noopener\">os.Mkdir()<\/a><a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_mkdir_path_mode_callback\" target=\"_blank\" rel=\"nofollow noopener\">fs.mkdir()<\/a>, <a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_mkdirsync_path_mode\" target=\"_blank\" rel=\"nofollow noopener\">fs.mkdirSync()<\/a>\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u4f5c\u6210(mkdir -p)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/FileUtils\/m\/makedirs.html\" target=\"_blank\" rel=\"nofollow noopener\">FileUtils.#makedirs<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#MkdirAll\" target=\"_blank\" rel=\"nofollow noopener\">os.MkdirAll()<\/a><br \/>\n\u30d5\u30a1\u30a4\u30eb\u524a\u9664<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/File\/s\/delete.html\" target=\"_blank\" rel=\"nofollow noopener\">File.delete<\/a><a href=\"https:\/\/golang.org\/pkg\/os\/#Remove\" target=\"_blank\" rel=\"nofollow noopener\">os.Remove()<\/a><a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_unlink_path_callback\" target=\"_blank\" rel=\"nofollow noopener\">fs.unlink()<\/a>, <a href=\"https:\/\/nodejs.org\/api\/fs.html#fs_fs_unlinksync_path\" target=\"_blank\" rel=\"nofollow noopener\">fs.unlinkSync()<\/a><\/div>\n<\/div>\n<h2>JSON \u662f\u4e00\u79cd\u8f7b\u91cf\u7ea7\u7684\u6570\u636e\u4ea4\u6362\u683c\u5f0f\u3002<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)JSON\u751f\u6210<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/JSON\/m\/generate.html\" target=\"_blank\" rel=\"nofollow noopener\">JSON.#generate<\/a><a href=\"https:\/\/golang.org\/pkg\/encoding\/json\/#Marshal\" target=\"_blank\" rel=\"nofollow noopener\">json.Marshal()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/JSON\/stringify\" target=\"_blank\" rel=\"nofollow noopener\">JSON.Stringify()<\/a>JSON\u5fa9\u53f7<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/JSON\/m\/parse.html\" target=\"_blank\" rel=\"nofollow noopener\">JSON.#parse<\/a><a href=\"https:\/\/golang.org\/pkg\/encoding\/json\/#Unmarshal\" target=\"_blank\" rel=\"nofollow noopener\">json.Unmarshal()<\/a><a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/JSON\/parse\" target=\"_blank\" rel=\"nofollow noopener\">JSON.parse()<\/a><\/div>\n<\/div>\n<h2>\u5bf9\u8c61\u64cd\u4f5c<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)\u30b3\u30d4\u30fc(clone\u4f5c\u6210)<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Object\/i\/clone.html\" target=\"_blank\" rel=\"nofollow noopener\">Object#clone<\/a><br \/>\n<a href=\"http:\/\/stackoverflow.com\/questions\/8206523\/how-to-create-a-deep-copy-of-an-object-in-ruby\" target=\"_blank\" rel=\"nofollow noopener\">*1<\/a>\u30e1\u30bd\u30c3\u30c9\u4e00\u89a7\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Object\/i\/methods.html\" target=\"_blank\" rel=\"nofollow noopener\">Object#methods<\/a><a href=\"http:\/\/stackoverflow.com\/questions\/21397653\/how-to-dump-methods-of-structs-in-golang\" target=\"_blank\" rel=\"nofollow noopener\">*1<\/a><a href=\"http:\/\/stackoverflow.com\/questions\/4352997\/how-to-list-the-functions-methods-of-a-javascript-object-is-it-even-possible\" target=\"_blank\" rel=\"nofollow noopener\">*1<\/a>\u30e1\u30f3\u30d0\u30fc\u4e00\u89a7\u53d6\u5f97<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/method\/Object\/i\/instance_variables.html\" target=\"_blank\" rel=\"nofollow noopener\">Object#instance_variables<\/a>fmt.Printf(&#8220;%+v\\n&#8221;, obj)<a href=\"http:\/\/stackoverflow.com\/questions\/2934787\/view-list-of-all-javascript-variables-in-google-chrome-console\" target=\"_blank\" rel=\"nofollow noopener\">*1<\/a><\/div>\n<\/div>\n<h2>\u56fe\u4e66\u9986<\/h2>\n<div>\n<div class=\"post-table\">\u5185\u5bb9Ruby2.2.0GolangNode(ES2015)\u30ed\u30ac\u30fc<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/library\/logger.html\" target=\"_blank\" rel=\"nofollow noopener\">logger<\/a><a href=\"https:\/\/golang.org\/pkg\/log\/\" target=\"_blank\" rel=\"nofollow noopener\">log<\/a><br \/>\nCLI\u30aa\u30d7\u30b7\u30e7\u30f3\u89e3\u6790<a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/library\/optparse.html\" target=\"_blank\" rel=\"nofollow noopener\">optparse<\/a>, <a href=\"http:\/\/docs.ruby-lang.org\/ja\/2.2.0\/library\/getoptlong.html\" target=\"_blank\" rel=\"nofollow noopener\">getoptlong<\/a><a href=\"https:\/\/golang.org\/pkg\/flag\/\" target=\"_blank\" rel=\"nofollow noopener\">flag<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u5bb6\u597d\uff0c\u6211\u662ferukiti\u3002\u6211\u6b63\u5728\u5236\u4f5c\u6211\u6700\u559c\u6b22\u7684Golang\u3001ES2015\uff08Node.js\uff09\u548c\u6211\u5fc3\u7075\u7684\u6545\u4e61Ru [&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-44530","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>Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355 - 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\/ruby\u3001golang\u548ces2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355\" \/>\n<meta property=\"og:description\" content=\"\u5927\u5bb6\u597d\uff0c\u6211\u662ferukiti\u3002\u6211\u6b63\u5728\u5236\u4f5c\u6211\u6700\u559c\u6b22\u7684Golang\u3001ES2015\uff08Node.js\uff09\u548c\u6211\u5fc3\u7075\u7684\u6545\u4e61Ru [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/ruby\u3001golang\u548ces2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-06T17:38:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-30T10:48:51+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=\"2 \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\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/\",\"name\":\"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2024-01-06T17:38:52+00:00\",\"dateModified\":\"2024-04-30T10:48:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355\"}]},{\"@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\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355 - 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\/ruby\u3001golang\u548ces2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355\/","og_locale":"zh_CN","og_type":"article","og_title":"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355","og_description":"\u5927\u5bb6\u597d\uff0c\u6211\u662ferukiti\u3002\u6211\u6b63\u5728\u5236\u4f5c\u6211\u6700\u559c\u6b22\u7684Golang\u3001ES2015\uff08Node.js\uff09\u548c\u6211\u5fc3\u7075\u7684\u6545\u4e61Ru [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/ruby\u3001golang\u548ces2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2024-01-06T17:38:52+00:00","article_modified_time":"2024-04-30T10:48:51+00:00","author":"\u6e05, \u5b87","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u6e05, \u5b87","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/","name":"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2024-01-06T17:38:52+00:00","dateModified":"2024-04-30T10:48:51+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/1a6ecd3d914d22a5ac32791ffc1fbd8e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Ruby\u3001Golang\u548cES2015\u7684\u6bd4\u8f83\u5907\u5fd8\u5355"}]},{"@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\/ruby%e3%80%81golang%e5%92%8ces2015%e7%9a%84%e6%af%94%e8%be%83%e5%a4%87%e5%bf%98%e5%8d%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44530","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=44530"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44530\/revisions"}],"predecessor-version":[{"id":93654,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/44530\/revisions\/93654"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=44530"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=44530"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=44530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}