{"id":205838,"date":"2025-06-12T12:46:18","date_gmt":"2025-06-12T04:46:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205838\/"},"modified":"2025-06-12T12:46:18","modified_gmt":"2025-06-12T04:46:18","slug":"%e4%bd%bf%e7%94%a8-go-%e5%87%bd%e6%95%b0%e6%89%a9%e5%b1%95-ruby-on-rails-%e5%ba%94%e7%94%a8%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205838\/","title":{"rendered":"\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f"},"content":{"rendered":"<p>\u5bf9\u4e8e\u4e00\u4e2aGOLANG\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0cGOLANG\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300a\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01,\u901a\u8fc7\u5c06 Go \u51fd\u6570\u96c6\u6210\u5230 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5229\u7528 Go \u7684\u4f18\u52bf\uff0c\u589e\u5f3a Rails \u7684\u529f\u80fd\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5 Go\u3001\u521b\u5efa Go \u51fd\u6570\u3001\u7f16\u8bd1\u51fd\u6570\u3001\u5728 Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\u96c6\u6210\u51fd\u6570\uff0c\u5305\u62ec\u521b\u5efa\u6a21\u578b\u3001\u6dfb\u52a0\u8c03\u7528\u51fd\u6570\u7684\u65b9\u6cd5\u3002\u5b9e\u6218\u6848\u4f8b\u4e2d\uff0c\u521b\u5efa\u4e86\u4e00\u4e2a Rails \u5e94\u7528\u7a0b\u5e8f\uff0c\u901a\u8fc7 Go \u51fd\u6570\u5c06\u6d88\u606f\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u5c55\u793a\u4e86\u5177\u4f53\u96c6\u6210\u6d41\u7a0b\u3002,<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730014836671dee7433720.jpg\" class=\"aligncenter\">,<br \/>\n<strong>\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f<\/strong>,<br \/>\n<strong>\u7b80\u4ecb<\/strong>,Ruby on Rails \u662f\u4e00\u79cd\u5f3a\u5927\u7684 Web \u5f00\u53d1\u6846\u67b6\uff0c\u4f46\u6709\u65f6\u60a8\u53ef\u80fd\u9700\u8981\u5229\u7528\u5176\u4ed6\u8bed\u8a00\u6216\u5e93\u7684\u7279\u5b9a\u529f\u80fd\u3002Go \u662f\u4e00\u79cd\u9ad8\u6027\u80fd\u7f16\u7a0b\u8bed\u8a00\uff0c\u975e\u5e38\u9002\u5408\u7f16\u5199\u5206\u5e03\u5f0f\u548c\u5e76\u53d1\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7\u5c06 Go \u51fd\u6570\u4e0e Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u96c6\u6210\uff0c\u60a8\u53ef\u4ee5\u5229\u7528 Go \u7684\u4f18\u52bf\uff0c\u540c\u65f6\u4ecd\u7136\u4fdd\u6301 Rails \u7684\u7075\u6d3b\u6027\u3002,<br \/>\n<strong>\u5b89\u88c5 Go<\/strong>,\u9996\u5148\uff0c\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5 Go\u3002\u6309\u7167 [Go \u7f51\u7ad9\u4e0a\u7684\u8bf4\u660e](https:\/\/go.dev\/doc\/install) \u8fdb\u884c\u64cd\u4f5c\u3002,<br \/>\n<strong>\u521b\u5efa Go \u51fd\u6570<\/strong>,\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Go \u6587\u4ef6\uff08\u4f8b\u5982\uff0c<br \/>\n<code>my_function.go<\/code>\uff09\uff1a,<br \/>\n<strong>\u7f16\u8bd1 Go \u51fd\u6570<\/strong>,\u4f7f\u7528<br \/>\n<code>go build<\/code> \u547d\u4ee4\u7f16\u8bd1 Go \u51fd\u6570\uff1a,\u751f\u6210\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff08<br \/>\n<code>my_function<\/code>\uff09\u5305\u542b\u60a8\u53ef\u4ee5\u4ece Rails \u5e94\u7528\u7a0b\u5e8f\u8bbf\u95ee\u7684\u51fd\u6570\u3002,<br \/>\n<strong>\u5728 Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\u96c6\u6210 Go \u51fd\u6570<\/strong>,\u8981\u5728 Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\u96c6\u6210 Go \u51fd\u6570\uff0c\u8bf7\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\uff1a,<br \/>\n<strong>\u5b9e\u6218\u6848\u4f8b<\/strong>,\u8ba9\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 Rails \u5e94\u7528\u7a0b\u5e8f\uff0c\u8be5\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528 Go \u51fd\u6570\u5c06\u6d88\u606f\u8f6c\u6362\u4e3a\u5927\u5199\uff1a,\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u8bbf\u95ee<br \/>\n<code>http:\/\/localhost:3000\/go_functions\/to_upper_case<\/code> \u5c06\u6d88\u606f\u8f6c\u6362\u4e3a\u5927\u5199\u3002,\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300a\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591aGOLANG\u77e5\u8bc6\uff01,\u5bf9\u4e8e\u4e00\u4e2aGOLANG\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0cGOLANG\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300a\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01,<br \/>\n<b><\/b> <\/p>\n<p>\u5f53\u524d\u4f4d\u7f6e\uff1a <span>&gt;<\/span>  <span>&gt;<\/span>  <span>&gt;<\/span>  <span>&gt;<\/span> <span>\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f<\/span><\/p>\n<h1>\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f<\/h1>\n<p><span>2024-10-27 15:40:51<\/span><br \/>\n<span><i><\/i>0\u6d4f\u89c8<\/span><br \/>\n<span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>\u5bf9\u4e8e\u4e00\u4e2aGOLANG\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u7262\u56fa\u624e\u5b9e\u7684\u57fa\u7840\u662f\u5341\u5206\u91cd\u8981\u7684\uff0cGOLANG\u5c31\u6765\u5e26\u5927\u5bb6\u4e00\u70b9\u70b9\u7684\u638c\u63e1\u57fa\u7840\u77e5\u8bc6\u70b9\u3002\u4eca\u5929\u672c\u7bc7\u6587\u7ae0\u5e26\u5927\u5bb6\u4e86\u89e3\u300a\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u300b\uff0c\u4e3b\u8981\u4ecb\u7ecd\u4e86\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u7684\u77e5\u8bc6\u79ef\u7d2f\u6709\u6240\u5e2e\u52a9\uff0c\u5feb\u70b9\u6536\u85cf\u8d77\u6765\u5427\uff0c\u5426\u5219\u9700\u8981\u65f6\u5c31\u627e\u4e0d\u5230\u4e86\uff01<\/p>\n<p>\u901a\u8fc7\u5c06 Go \u51fd\u6570\u96c6\u6210\u5230 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5229\u7528 Go \u7684\u4f18\u52bf\uff0c\u589e\u5f3a Rails \u7684\u529f\u80fd\u3002\u5177\u4f53\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5 Go\u3001\u521b\u5efa Go \u51fd\u6570\u3001\u7f16\u8bd1\u51fd\u6570\u3001\u5728 Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\u96c6\u6210\u51fd\u6570\uff0c\u5305\u62ec\u521b\u5efa\u6a21\u578b\u3001\u6dfb\u52a0\u8c03\u7528\u51fd\u6570\u7684\u65b9\u6cd5\u3002\u5b9e\u6218\u6848\u4f8b\u4e2d\uff0c\u521b\u5efa\u4e86\u4e00\u4e2a Rails \u5e94\u7528\u7a0b\u5e8f\uff0c\u901a\u8fc7 Go \u51fd\u6570\u5c06\u6d88\u606f\u8f6c\u6362\u4e3a\u5927\u5199\uff0c\u5c55\u793a\u4e86\u5177\u4f53\u96c6\u6210\u6d41\u7a0b\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730014836671dee7433720.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f<\/strong><\/p>\n<p><strong>\u7b80\u4ecb<\/strong><\/p>\n<p>Ruby on Rails \u662f\u4e00\u79cd\u5f3a\u5927\u7684 Web \u5f00\u53d1\u6846\u67b6\uff0c\u4f46\u6709\u65f6\u60a8\u53ef\u80fd\u9700\u8981\u5229\u7528\u5176\u4ed6\u8bed\u8a00\u6216\u5e93\u7684\u7279\u5b9a\u529f\u80fd\u3002Go \u662f\u4e00\u79cd\u9ad8\u6027\u80fd\u7f16\u7a0b\u8bed\u8a00\uff0c\u975e\u5e38\u9002\u5408\u7f16\u5199\u5206\u5e03\u5f0f\u548c\u5e76\u53d1\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7\u5c06 Go \u51fd\u6570\u4e0e Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u96c6\u6210\uff0c\u60a8\u53ef\u4ee5\u5229\u7528 Go \u7684\u4f18\u52bf\uff0c\u540c\u65f6\u4ecd\u7136\u4fdd\u6301 Rails \u7684\u7075\u6d3b\u6027\u3002<\/p>\n<p><strong>\u5b89\u88c5 Go<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u5728\u60a8\u7684\u7cfb\u7edf\u4e0a\u5b89\u88c5 Go\u3002\u6309\u7167 [Go \u7f51\u7ad9\u4e0a\u7684\u8bf4\u660e](https:\/\/go.dev\/doc\/install) \u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u521b\u5efa Go \u51fd\u6570<\/strong><\/p>\n<p>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Go \u6587\u4ef6\uff08\u4f8b\u5982\uff0c<code>my_function.go<\/code>\uff09\uff1a<\/p>\n<pre>package main\n\nimport (\n    \"context\"\n    \"fmt\"\n    \"time\"\n)\n\nfunc MyFunction(ctx context.Context, message string) (string, error) {\n    \/\/ \u5728\u8fd9\u91cc\u6267\u884c\u51fd\u6570\u903b\u8f91\u5e76\u8fd4\u56de\u7ed3\u679c\n    time.Sleep(1 * time.Second) \/\/ \u5ef6\u8fdf\u4e00\u79d2\u4ee5\u6a21\u62df\u957f\u65f6\u95f4\u8fd0\u884c\u7684\u64cd\u4f5c\n    return fmt.Sprintf(\"Go says: %s\", message), nil\n}<\/pre>\n<p><strong>\u7f16\u8bd1 Go \u51fd\u6570<\/strong><\/p>\n<p>\u4f7f\u7528 <code>go build<\/code> \u547d\u4ee4\u7f16\u8bd1 Go \u51fd\u6570\uff1a<\/p>\n<pre>go build -o my_function my_function.go<\/pre>\n<p>\u751f\u6210\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\uff08<code>my_function<\/code>\uff09\u5305\u542b\u60a8\u53ef\u4ee5\u4ece Rails \u5e94\u7528\u7a0b\u5e8f\u8bbf\u95ee\u7684\u51fd\u6570\u3002<\/p>\n<p><strong>\u5728 Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\u96c6\u6210 Go \u51fd\u6570<\/strong><\/p>\n<p>\u8981\u5728 Rails \u5e94\u7528\u7a0b\u5e8f\u4e2d\u96c6\u6210 Go \u51fd\u6570\uff0c\u8bf7\u9075\u5faa\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Rails \u6a21\u578b\uff08\u4f8b\u5982\uff0c<code>GoFunction<\/code>\uff09\uff1a<\/li>\n<\/ol>\n<pre>rails generate model GoFunction name:string result:string<\/pre>\n<ol>\n<li>\u5728\u6a21\u578b\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u65b9\u6cd5\u6765\u8c03\u7528 Go \u51fd\u6570\uff1a<\/li>\n<\/ol>\n<pre>class GoFunction &lt; ApplicationRecord\n  def execute(message)\n    # \u6267\u884c\u5916\u90e8 Go \u51fd\u6570\n    result = `.\/my_function` \"#{message}\"\n    update!(result: result)\n  end\nend<\/pre>\n<p><strong>\u5b9e\u6218\u6848\u4f8b<\/strong><\/p>\n<p>\u8ba9\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684 Rails \u5e94\u7528\u7a0b\u5e8f\uff0c\u8be5\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528 Go \u51fd\u6570\u5c06\u6d88\u606f\u8f6c\u6362\u4e3a\u5927\u5199\uff1a<\/p>\n<ol>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Rails \u5e94\u7528\u7a0b\u5e8f\uff1a<\/li>\n<\/ol>\n<pre>rails new go_app<\/pre>\n<ol>\n<li>\u6309\u7167\u4e0a\u8ff0\u6b65\u9aa4\u96c6\u6210 Go \u51fd\u6570\u3002<\/li>\n<li>\u5728\u63a7\u5236\u53f0\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u8fc1\u79fb\uff1a<\/li>\n<\/ol>\n<pre>rails generate migration AddToUpperCaseFunction<\/pre>\n<ol>\n<li>\u5728\u8fc1\u79fb\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/li>\n<\/ol>\n<pre>class AddToUpperCaseFunction &lt; ActiveRecord::Migration[7.0]\n  def change\n    create_table :go_functions do |t|\n      t.string :name\n      t.string :result\n    end\n  end\nend<\/pre>\n<ol>\n<li>\u8fd0\u884c\u8fc1\u79fb\uff1a<\/li>\n<\/ol>\n<pre>rails db:migrate<\/pre>\n<ol>\n<li>\u5728 Rails \u8def\u7531\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u8def\u7531\uff1a<\/li>\n<\/ol>\n<pre>Rails.application.routes.draw do\n  resources :go_functions\nend<\/pre>\n<ol>\n<li>\u5728 <code>config\/routes.rb<\/code> \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/li>\n<\/ol>\n<pre>Rails.application.routes.draw do\n  post 'go_functions\/to_upper_case', to: 'go_functions#to_upper_case', as: :to_upper_case\nend<\/pre>\n<ol>\n<li>\u5728 <code>app\/controllers\/go_functions_controller.rb<\/code> \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/li>\n<\/ol>\n<pre>class GoFunctionsController &lt; ApplicationController\n  def to_upper_case\n    @go_function = GoFunction.find(params[:id])\n    @go_function.execute(params[:message])\n\n    redirect_to go_function_path(@go_function), notice: 'Message converted to upper case!'\n  end\nend<\/pre>\n<ol>\n<li>\u5728 <code>app\/views\/go_functions\/show.html.erb<\/code> \u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/li>\n<\/ol>\n<pre>&lt;h1&gt;Upper Case Result&lt;\/h1&gt;\n\n&lt;p&gt;Message: &lt;%= @go_function.name %&gt;&lt;\/p&gt;\n&lt;p&gt;Upper Case Result: &lt;%= @go_function.result %&gt;&lt;\/p&gt;<\/pre>\n<p>\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u8bbf\u95ee <code>http:\/\/localhost:3000\/go_functions\/to_upper_case<\/code> \u5c06\u6d88\u606f\u8f6c\u6362\u4e3a\u5927\u5199\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300a\u4f7f\u7528 Go \u51fd\u6570\u6269\u5c55 Ruby on Rails \u5e94\u7528\u7a0b\u5e8f\u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591aGOLANG\u77e5\u8bc6\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u5206\u7247\u4e0a\u4f20\u6587\u4ef6\uff0c\u540e\u7aef\u63a5\u6536\u4e3a\u4f55\u751f\u6210blob\u6587\u4ef6\uff1f\n <\/dd>\n<\/dl>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u5982\u4f55\u901a\u8fc7\u5f02\u5e38\u5904\u7406\u63d0\u9ad8PHP\u7a0b\u5e8f\u7684\u5065\u58ee\u6027\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5bf9\u4e8e\u4e00\u4e2aGOLANG\u5f00\u53d1\u8005\u6765\u8bf4\uff0c&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-205838","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=205838"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205838\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205838"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}