{"id":205872,"date":"2025-06-12T10:12:45","date_gmt":"2025-06-12T02:12:45","guid":{"rendered":"https:\/\/server.hk\/cnblog\/205872\/"},"modified":"2025-06-12T10:12:45","modified_gmt":"2025-06-12T02:12:45","slug":"%e5%a6%82%e4%bd%95%e4%bc%a0%e9%80%92%e5%87%bd%e6%95%b0%e4%bd%9c%e4%b8%ba-golang-%e5%87%bd%e6%95%b0%e7%9a%84%e5%8f%82%e6%95%b0%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/205872\/","title":{"rendered":"\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a Golang \u51fd\u6570\u7684\u53c2\u6570\uff1f"},"content":{"rendered":"<p>\u79ef\u7d2f\u77e5\u8bc6\uff0c\u80dc\u8fc7\u79ef\u84c4\u91d1\u94f6\uff01\u6bd5\u7adf\u5728GOLANG\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u5f80\u5f80\u90fd\u662f\u4e00\u4e9b\u7ec6\u8282\u77e5\u8bc6\u70b9\u8fd8\u6ca1\u6709\u638c\u63e1\u597d\u800c\u5bfc\u81f4\u7684\uff0c\u56e0\u6b64\u57fa\u7840\u77e5\u8bc6\u70b9\u7684\u79ef\u7d2f\u662f\u5f88\u91cd\u8981\u7684\u3002\u4e0b\u9762\u672c\u6587\u300a\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f\u300b\uff0c\u5c31\u5e26\u5927\u5bb6\u8bb2\u89e3\u4e00\u4e0b\u77e5\u8bc6\u70b9\uff0c\u82e5\u662f\u4f60\u5bf9\u672c\u6587\u611f\u5174\u8da3\uff0c\u6216\u8005\u662f\u60f3\u641e\u61c2\u5176\u4e2d\u67d0\u4e2a\u77e5\u8bc6\u70b9\uff0c\u5c31\u8bf7\u4f60\u7ee7\u7eed\u5f80\u4e0b\u770b\u5427~,\u5728 Go \u4e2d\uff0c\u51fd\u6570\u53ef\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\uff0c\u63d0\u4f9b\u7075\u6d3b\u6027\u548c\u4ee3\u7801\u91cd\u7528\u6027\u3002\u8bed\u6cd5\uff1a\u4f20\u9012\u51fd\u6570\u65f6\u4f7f\u7528 func \u5173\u952e\u5b57\u58f0\u660e\u51fd\u6570\u7c7b\u578b\u3002\u4f20\u9012\u51fd\u6570\uff1a\u4f7f\u7528\u533f\u540d\u51fd\u6570\u6216\u5df2\u547d\u540d\u7684\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u3002\u5b9e\u6218\u6848\u4f8b\uff1afindIndex \u51fd\u6570\u4f7f\u7528\u6bd4\u8f83\u51fd\u6570\u5728\u6570\u7ec4\u4e2d\u67e5\u627e\u76ee\u6807\u503c\uff0c\u901a\u8fc7\u4f20\u9012\u51fd\u6570\u53c2\u6570\u5b9e\u73b0\u4e0d\u540c\u6bd4\u8f83\u903b\u8f91\uff0c\u589e\u5f3a\u4ee3\u7801\u7075\u6d3b\u6027\u3002,<br \/>\n<img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730024976671e16106d5d7.jpg\" class=\"aligncenter\">,<br \/>\n<strong>\u5982\u4f55\u5728 GOLANG \u51fd\u6570\u4e2d\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570<\/strong>,\u5728 Go \u8bed\u8a00\u4e2d\uff0c\u51fd\u6570\u662f\u4e00\u79cd\u53ef\u4ee5\u901a\u8fc7\u4f20\u9012\u5b83\u4eec\u4f5c\u4e3a\u53c2\u6570\u6765\u4f20\u9012\u7ed9\u5176\u4ed6\u51fd\u6570\u7684\u503c\u7c7b\u578b\u3002\u8fd9\u4e3a\u7f16\u5199\u7075\u6d3b\u4e14\u53ef\u91cd\u7528\u7684\u4ee3\u7801\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u65b9\u6cd5\u3002,<br \/>\n<strong>\u8bed\u6cd5<\/strong>,\u8981\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u8bf7\u5728\u51fd\u6570\u7c7b\u578b\u58f0\u660e\u4e2d\u4f7f\u7528<br \/>\n<code>func<\/code> \u5173\u952e\u5b57\uff1a,\u6b64\u4ee3\u7801\u58f0\u660e\u4e86\u4e00\u4e2a\u540d\u4e3a<br \/>\n<code>myFunction<\/code> \u7684\u51fd\u6570\uff0c\u5b83\u63a5\u53d7\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u53c2\u6570\u3002\u8be5\u51fd\u6570\u7684\u53c2\u6570\u7c7b\u578b\u4e3a<br \/>\n<code>func(int)<\/code>\uff0c\u8868\u793a\u5b83\u63a5\u53d7\u4e00\u4e2a<br \/>\n<code>int<\/code> \u7c7b\u578b\u53c2\u6570\u5e76\u8fd4\u56de\u4e00\u4e2a\u65e0\u53c2\u6570\u7684\u51fd\u6570\u3002,<br \/>\n<strong>\u4f20\u9012\u51fd\u6570<\/strong>,\u8981\u5c06\u51fd\u6570\u4f20\u9012\u7ed9<br \/>\n<code>myFunction<\/code>\uff0c\u8bf7\u4f7f\u7528\u533f\u540d\u5b57\u9762\u91cf\u51fd\u6570\u6216\u5df2\u547d\u540d\u7684\u51fd\u6570\uff1a,<br \/>\n<strong>\u533f\u540d\u51fd\u6570\uff1a<\/strong>,<br \/>\n<strong>\u5df2\u547d\u540d\u7684\u51fd\u6570\uff1a<\/strong>,<br \/>\n<strong>\u5b9e\u6218\u6848\u4f8b<\/strong>,\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u7684\u5b9e\u9645\u6848\u4f8b\uff1a,<br \/>\n<strong>\u8f93\u51fa\uff1a<\/strong>,\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<br \/>\n<code>findIndex<\/code> \u51fd\u6570\u63a5\u53d7\u4e00\u4e2a\u6570\u7ec4\u3001\u4e00\u4e2a\u76ee\u6807\u503c\u548c\u4e00\u4e2a\u6bd4\u8f83\u51fd\u6570\u3002\u5b83\u904d\u5386\u6570\u7ec4\uff0c\u5e76\u4f7f\u7528\u63d0\u4f9b\u7684\u6bd4\u8f83\u51fd\u6570\u68c0\u67e5\u6bcf\u4e2a\u5143\u7d20\u662f\u5426\u7b49\u4e8e\u76ee\u6807\u503c\u3002\u5982\u679c\u627e\u5230\u5339\u914d\u9879\uff0c\u5219\u8fd4\u56de\u5b83\u7684\u7d22\u5f15\u3002\u5426\u5219\uff0c\u8fd4\u56de -1\u3002,\u901a\u8fc7\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u4f7f\u7528\u4e0d\u540c\u6bd4\u8f83\u903b\u8f91\u6765\u5bf9\u6570\u7ec4\u8fdb\u884c\u641c\u7d22\u3002,\u4ee5\u4e0a\u5c31\u662f\u300a\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f\u300b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u5173\u4e8e\u7684\u8d44\u6599\u8bf7\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff01,\u79ef\u7d2f\u77e5\u8bc6\uff0c\u80dc\u8fc7\u79ef\u84c4\u91d1\u94f6\uff01\u6bd5\u7adf\u5728GOLANG\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u5f80\u5f80\u90fd\u662f\u4e00\u4e9b\u7ec6\u8282\u77e5\u8bc6\u70b9\u8fd8\u6ca1\u6709\u638c\u63e1\u597d\u800c\u5bfc\u81f4\u7684\uff0c\u56e0\u6b64\u57fa\u7840\u77e5\u8bc6\u70b9\u7684\u79ef\u7d2f\u662f\u5f88\u91cd\u8981\u7684\u3002\u4e0b\u9762\u672c\u6587\u300a\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f\u300b\uff0c\u5c31\u5e26\u5927\u5bb6\u8bb2\u89e3\u4e00\u4e0b\u77e5\u8bc6\u70b9\uff0c\u82e5\u662f\u4f60\u5bf9\u672c\u6587\u611f\u5174\u8da3\uff0c\u6216\u8005\u662f\u60f3\u641e\u61c2\u5176\u4e2d\u67d0\u4e2a\u77e5\u8bc6\u70b9\uff0c\u5c31\u8bf7\u4f60\u7ee7\u7eed\u5f80\u4e0b\u770b\u5427~,<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>\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f<\/span><\/p>\n<h1>\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f<\/h1>\n<p><span>2024-10-27 18:29: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>\u79ef\u7d2f\u77e5\u8bc6\uff0c\u80dc\u8fc7\u79ef\u84c4\u91d1\u94f6\uff01\u6bd5\u7adf\u5728GOLANG\u5f00\u53d1\u7684\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u9047\u5230\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u5f80\u5f80\u90fd\u662f\u4e00\u4e9b\u7ec6\u8282\u77e5\u8bc6\u70b9\u8fd8\u6ca1\u6709\u638c\u63e1\u597d\u800c\u5bfc\u81f4\u7684\uff0c\u56e0\u6b64\u57fa\u7840\u77e5\u8bc6\u70b9\u7684\u79ef\u7d2f\u662f\u5f88\u91cd\u8981\u7684\u3002\u4e0b\u9762\u672c\u6587\u300a\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f\u300b\uff0c\u5c31\u5e26\u5927\u5bb6\u8bb2\u89e3\u4e00\u4e0b\u77e5\u8bc6\u70b9\uff0c\u82e5\u662f\u4f60\u5bf9\u672c\u6587\u611f\u5174\u8da3\uff0c\u6216\u8005\u662f\u60f3\u641e\u61c2\u5176\u4e2d\u67d0\u4e2a\u77e5\u8bc6\u70b9\uff0c\u5c31\u8bf7\u4f60\u7ee7\u7eed\u5f80\u4e0b\u770b\u5427~<\/p>\n<p>\u5728 Go \u4e2d\uff0c\u51fd\u6570\u53ef\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\uff0c\u63d0\u4f9b\u7075\u6d3b\u6027\u548c\u4ee3\u7801\u91cd\u7528\u6027\u3002\u8bed\u6cd5\uff1a\u4f20\u9012\u51fd\u6570\u65f6\u4f7f\u7528 func \u5173\u952e\u5b57\u58f0\u660e\u51fd\u6570\u7c7b\u578b\u3002\u4f20\u9012\u51fd\u6570\uff1a\u4f7f\u7528\u533f\u540d\u51fd\u6570\u6216\u5df2\u547d\u540d\u7684\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u3002\u5b9e\u6218\u6848\u4f8b\uff1afindIndex \u51fd\u6570\u4f7f\u7528\u6bd4\u8f83\u51fd\u6570\u5728\u6570\u7ec4\u4e2d\u67e5\u627e\u76ee\u6807\u503c\uff0c\u901a\u8fc7\u4f20\u9012\u51fd\u6570\u53c2\u6570\u5b9e\u73b0\u4e0d\u540c\u6bd4\u8f83\u903b\u8f91\uff0c\u589e\u5f3a\u4ee3\u7801\u7075\u6d3b\u6027\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241027\/1730024976671e16106d5d7.jpg\" class=\"aligncenter\"><\/p>\n<p><strong>\u5982\u4f55\u5728 GOLANG \u51fd\u6570\u4e2d\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570<\/strong><\/p>\n<p>\u5728 Go \u8bed\u8a00\u4e2d\uff0c\u51fd\u6570\u662f\u4e00\u79cd\u53ef\u4ee5\u901a\u8fc7\u4f20\u9012\u5b83\u4eec\u4f5c\u4e3a\u53c2\u6570\u6765\u4f20\u9012\u7ed9\u5176\u4ed6\u51fd\u6570\u7684\u503c\u7c7b\u578b\u3002\u8fd9\u4e3a\u7f16\u5199\u7075\u6d3b\u4e14\u53ef\u91cd\u7528\u7684\u4ee3\u7801\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u65b9\u6cd5\u3002<\/p>\n<p><strong>\u8bed\u6cd5<\/strong><\/p>\n<p>\u8981\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u8bf7\u5728\u51fd\u6570\u7c7b\u578b\u58f0\u660e\u4e2d\u4f7f\u7528 <code>func<\/code> \u5173\u952e\u5b57\uff1a<\/p>\n<pre>func myFunction(f func(int))<\/pre>\n<p>\u6b64\u4ee3\u7801\u58f0\u660e\u4e86\u4e00\u4e2a\u540d\u4e3a <code>myFunction<\/code> \u7684\u51fd\u6570\uff0c\u5b83\u63a5\u53d7\u4e00\u4e2a\u51fd\u6570\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u53c2\u6570\u3002\u8be5\u51fd\u6570\u7684\u53c2\u6570\u7c7b\u578b\u4e3a <code>func(int)<\/code>\uff0c\u8868\u793a\u5b83\u63a5\u53d7\u4e00\u4e2a <code>int<\/code> \u7c7b\u578b\u53c2\u6570\u5e76\u8fd4\u56de\u4e00\u4e2a\u65e0\u53c2\u6570\u7684\u51fd\u6570\u3002<\/p>\n<p><strong>\u4f20\u9012\u51fd\u6570<\/strong><\/p>\n<p>\u8981\u5c06\u51fd\u6570\u4f20\u9012\u7ed9 <code>myFunction<\/code>\uff0c\u8bf7\u4f7f\u7528\u533f\u540d\u5b57\u9762\u91cf\u51fd\u6570\u6216\u5df2\u547d\u540d\u7684\u51fd\u6570\uff1a<\/p>\n<p><strong>\u533f\u540d\u51fd\u6570\uff1a<\/strong><\/p>\n<pre>func myFunction(f func(int)) {\n    f(10)  \/\/ \u8c03\u7528\u533f\u540d\u51fd\u6570\n}\n\nmyFunction(func(n int) {})\n<\/pre>\n<p><strong>\u5df2\u547d\u540d\u7684\u51fd\u6570\uff1a<\/strong><\/p>\n<pre>func square(n int) int {\n    return n * n\n}\n\nfunc myFunction(f func(int) int) {\n    fmt.Println(f(10))  \/\/ \u8c03\u7528\u5df2\u547d\u540d\u7684\u51fd\u6570\n}\n\nmyFunction(square)<\/pre>\n<p><strong>\u5b9e\u6218\u6848\u4f8b<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u7684\u5b9e\u9645\u6848\u4f8b\uff1a<\/p>\n<pre>package main\n\nimport \"fmt\"\n\n\/\/ \u5b9a\u4e49\u4e00\u4e2a\u6bd4\u8f83\u51fd\u6570\u7c7b\u578b\ntype Comparator func(int, int) bool\n\n\/\/ \u5b9a\u4e49\u4e00\u4e2a\u6bd4\u8f83\u51fd\u6570\uff0c\u7528\u4e8e\u6bd4\u8f83\u4e24\u4e2a\u6574\u6570\u662f\u5426\u76f8\u7b49\nfunc equal(a, b int) bool {\n    return a == b\n}\n\n\/\/ \u5b9a\u4e49\u4e00\u4e2a\u4f7f\u7528\u6bd4\u8f83\u51fd\u6570\u7684\u51fd\u6570\nfunc findIndex(arr []int, target int, comparator Comparator) int {\n    for i, v := range arr {\n        if comparator(v, target) {\n            return i\n        }\n    }\n\n    return -1\n}\n\nfunc main() {\n    arr := []int{1, 2, 3, 4, 5}\n    target := 3\n\n    \/\/ \u4f7f\u7528\u533f\u540d\u6bd4\u8f83\u51fd\u6570\n    fmt.Println(findIndex(arr, target, func(a, b int) bool {\n        return a == b\n    }))\n\n    \/\/ \u4f7f\u7528\u5df2\u547d\u540d\u7684\u6bd4\u8f83\u51fd\u6570\n    fmt.Println(findIndex(arr, target, equal))\n}<\/pre>\n<p><strong>\u8f93\u51fa\uff1a<\/strong><\/p>\n<pre>2\n2<\/pre>\n<p>\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c<code>findIndex<\/code> \u51fd\u6570\u63a5\u53d7\u4e00\u4e2a\u6570\u7ec4\u3001\u4e00\u4e2a\u76ee\u6807\u503c\u548c\u4e00\u4e2a\u6bd4\u8f83\u51fd\u6570\u3002\u5b83\u904d\u5386\u6570\u7ec4\uff0c\u5e76\u4f7f\u7528\u63d0\u4f9b\u7684\u6bd4\u8f83\u51fd\u6570\u68c0\u67e5\u6bcf\u4e2a\u5143\u7d20\u662f\u5426\u7b49\u4e8e\u76ee\u6807\u503c\u3002\u5982\u679c\u627e\u5230\u5339\u914d\u9879\uff0c\u5219\u8fd4\u56de\u5b83\u7684\u7d22\u5f15\u3002\u5426\u5219\uff0c\u8fd4\u56de -1\u3002<\/p>\n<p>\u901a\u8fc7\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u7075\u6d3b\u5730\u4f7f\u7528\u4e0d\u540c\u6bd4\u8f83\u903b\u8f91\u6765\u5bf9\u6570\u7ec4\u8fdb\u884c\u641c\u7d22\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u300a\u5982\u4f55\u4f20\u9012\u51fd\u6570\u4f5c\u4e3a GOLANG \u51fd\u6570\u7684\u53c2\u6570\uff1f\u300b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u5173\u4e8e\u7684\u8d44\u6599\u8bf7\u5173\u6ce8GOLANG\u516c\u4f17\u53f7\uff01<\/p>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   Java \u51fd\u6570\u4e2d\u4f7f\u7528 varargs \u53c2\u6570\u7684\u6700\u4f73\u5b9e\u8df5\u662f\u4ec0\u4e48\uff1f\n <\/dd>\n<\/dl>\n<dl>\n<dt>\n <\/dt>\n<dd>\n   \u7535\u6c60\u5236\u9020\u5546Northvolt \u5f00\u59cb\u91cd\u7ec4\uff0c\u4e3b\u5de5\u5382\u8d1f\u8d23\u4eba\u5c06\u8f9e\u804c\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u79ef\u7d2f\u77e5\u8bc6\uff0c\u80dc\u8fc7\u79ef\u84c4\u91d1\u94f6\uff01\u6bd5\u7adf\u5728G&#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-205872","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205872","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=205872"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/205872\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=205872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=205872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=205872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}