{"id":987,"date":"2025-01-16T00:36:05","date_gmt":"2025-01-15T16:36:05","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=987"},"modified":"2025-01-16T00:36:05","modified_gmt":"2025-01-15T16:36:05","slug":"%e6%b7%b1%e5%85%a5%e4%ba%86%e8%a7%a3-go-%e7%9a%84-net-netip-addr-%e7%b1%bb%e5%9e%8b%ef%bc%9a%e9%ab%98%e6%95%88%e7%9a%84-ip-%e5%9c%b0%e5%9d%80%e5%a4%84%e7%90%86%e4%b8%8e%e6%80%a7%e8%83%bd","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/01\/16\/%e6%b7%b1%e5%85%a5%e4%ba%86%e8%a7%a3-go-%e7%9a%84-net-netip-addr-%e7%b1%bb%e5%9e%8b%ef%bc%9a%e9%ab%98%e6%95%88%e7%9a%84-ip-%e5%9c%b0%e5%9d%80%e5%a4%84%e7%90%86%e4%b8%8e%e6%80%a7%e8%83%bd\/","title":{"rendered":"\u6df1\u5165\u4e86\u89e3 Go \u7684\u00a0net\/netip.Addr\u00a0\u7c7b\u578b\uff1a\u9ad8\u6548\u7684 IP \u5730\u5740\u5904\u7406\u4e0e\u6027\u80fd\u4f18\u5316"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u5728 Go \u8bed\u8a00\u4e2d\uff0c\u7f51\u7edc\u7f16\u7a0b\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u7ec4\u6210\u90e8\u5206\uff0c\u800c\u5904\u7406 IP \u5730\u5740\u662f\u51e0\u4e4e\u6240\u6709\u7f51\u7edc\u5e94\u7528\u7684\u57fa\u672c\u9700\u6c42\u4e4b\u4e00\u3002Go \u6807\u51c6\u5e93\u4e2d\u7684 <code>net\/netip<\/code> \u5305\uff0c\u63d0\u4f9b\u4e86\u4e00\u79cd\u65b0\u7684\u3001\u66f4\u52a0\u9ad8\u6548\u548c\u7b80\u4fbf\u7684\u65b9\u5f0f\u6765\u5904\u7406 IP \u5730\u5740\uff0c\u7279\u522b\u662f\u81ea Go 1.18 \u7248\u672c\u4ee5\u6765\u5f15\u5165\u7684 <code>netip.Addr<\/code> \u7c7b\u578b\uff0c\u63d0\u4f9b\u4e86\u66f4\u5f3a\u7684\u6027\u80fd\u548c\u7075\u6d3b\u6027\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8 <code>net\/netip.Addr<\/code> \u7c7b\u578b\u7684\u7279\u70b9\u3001\u7528\u6cd5\u548c\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. <strong>\u4ec0\u4e48\u662f <code>net\/netip.Addr<\/code> \u7c7b\u578b\uff1f<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>net\/netip.Addr<\/code> \u662f Go 1.18 \u5f15\u5165\u7684\u65b0\u7684 IP \u5730\u5740\u8868\u793a\u65b9\u5f0f\uff0c\u5b83\u662f <code>net.IP<\/code> \u7c7b\u578b\u7684\u4e00\u4e2a\u66ff\u4ee3\u54c1\uff0c\u5e76\u88ab\u8bbe\u8ba1\u4e3a\u66f4\u9ad8\u6548\u4e14\u66f4\u52a0\u6613\u4e8e\u4f7f\u7528\u7684\u89e3\u51b3\u65b9\u6848\u3002\u4e0e <code>net.IP<\/code> \u76f8\u6bd4\uff0c<code>net\/netip.Addr<\/code> \u7c7b\u578b\u63d0\u4f9b\u4e86\u66f4\u597d\u7684\u6027\u80fd\u3001\u66f4\u5c11\u7684\u5185\u5b58\u5360\u7528\u548c\u66f4\u7b80\u6d01\u7684 API\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. <strong><code>net\/netip.Addr<\/code> \u4e0e <code>net.IP<\/code> \u7684\u533a\u522b<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 Go \u8bed\u8a00\u4e2d\uff0c<code>net.IP<\/code> \u662f\u5904\u7406 IP \u5730\u5740\u7684\u4f20\u7edf\u65b9\u5f0f\uff0c\u5b83\u662f <code>[]byte<\/code> \u7c7b\u578b\u7684\u522b\u540d\uff0c\u56e0\u6b64\uff0c\u5b83\u7684\u6bcf\u4e2a\u5b9e\u4f8b\u90fd\u9700\u8981\u8fdb\u884c\u5185\u5b58\u5206\u914d\uff0c\u5e76\u4e14\u7f3a\u4e4f\u4e00\u4e9b\u9488\u5bf9 IP \u5730\u5740\u4f18\u5316\u7684\u529f\u80fd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f8\u6bd4\u4e4b\u4e0b\uff0c<code>net\/netip.Addr<\/code> \u63d0\u4f9b\u4e86\u4ee5\u4e0b\u4f18\u52bf\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u65e0\u5185\u5b58\u5206\u914d<\/strong>\uff1a<code>netip.Addr<\/code> \u7c7b\u578b\u5185\u90e8\u4f7f\u7528\u7ed3\u6784\u4f53\u5b58\u50a8 IP \u5730\u5740\uff0c\u4e0d\u9700\u8981\u8fdb\u884c\u989d\u5916\u7684\u5185\u5b58\u5206\u914d\uff0c\u907f\u514d\u4e86 <code>net.IP<\/code> \u4e2d\u7684\u5207\u7247\u5185\u5b58\u5f00\u9500\u3002<\/li>\n\n\n\n<li><strong>\u66f4\u9ad8\u6548\u7684\u6bd4\u8f83\u548c\u64cd\u4f5c<\/strong>\uff1a\u7531\u4e8e <code>netip.Addr<\/code> \u76f4\u63a5\u652f\u6301\u539f\u751f\u7684\u5185\u5b58\u6bd4\u8f83\uff0c\u56e0\u6b64\u5728\u6027\u80fd\u4e0a\u6709\u663e\u8457\u63d0\u5347\u3002<\/li>\n\n\n\n<li><strong>IPv4 \u548c IPv6 \u7edf\u4e00\u8868\u793a<\/strong>\uff1a<code>netip.Addr<\/code> \u540c\u65f6\u652f\u6301 IPv4 \u548c IPv6 \u5730\u5740\uff0c\u5e76\u4e14\u63d0\u4f9b\u4e86\u7edf\u4e00\u7684 API \u6765\u5904\u7406\u4e0d\u540c\u7c7b\u578b\u7684\u5730\u5740\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">3. <strong>\u5982\u4f55\u4f7f\u7528 <code>net\/netip.Addr<\/code> \u7c7b\u578b\uff1f<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">3.1 <strong>\u521b\u5efa\u548c\u89e3\u6790 IP \u5730\u5740<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>net\/netip.Addr<\/code> \u63d0\u4f9b\u4e86 <code>Parse<\/code> \u548c <code>MustParse<\/code> \u65b9\u6cd5\u6765\u4ece\u5b57\u7b26\u4e32\u4e2d\u89e3\u6790 IP \u5730\u5740\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n    \"net\/netip\"\n)\n\nfunc main() {\n    \/\/ \u89e3\u6790 IP \u5730\u5740\n    addr, err := netip.ParseAddr(\"192.168.1.1\")\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        return\n    }\n    fmt.Println(\"Parsed Addr:\", addr)\n\n    \/\/ \u4f7f\u7528 MustParse \u53ef\u4ee5\u5728\u89e3\u6790\u5931\u8d25\u65f6\u629b\u51fa panic\n    addr2 := netip.MustParseAddr(\"2001:db8::ff00:42:8329\")\n    fmt.Println(\"Parsed Addr (MustParse):\", addr2)\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>netip.ParseAddr<\/code>\uff1a\u5c1d\u8bd5\u89e3\u6790\u4e00\u4e2a IP \u5730\u5740\u5b57\u7b26\u4e32\u3002\u5982\u679c\u89e3\u6790\u6210\u529f\uff0c\u8fd4\u56de\u4e00\u4e2a <code>netip.Addr<\/code> \u7c7b\u578b\u7684\u5b9e\u4f8b\uff0c\u5426\u5219\u8fd4\u56de\u9519\u8bef\u3002<\/li>\n\n\n\n<li><code>netip.MustParseAddr<\/code>\uff1a\u4e0e <code>ParseAddr<\/code> \u7c7b\u4f3c\uff0c\u4f46\u5982\u679c\u89e3\u6790\u5931\u8d25\uff0c\u4f1a\u89e6\u53d1 <code>panic<\/code>\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3.2 <strong>\u68c0\u67e5 IP \u5730\u5740\u7c7b\u578b<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>netip.Addr<\/code> \u7c7b\u578b\u63d0\u4f9b\u4e86 <code>IsValid<\/code> \u65b9\u6cd5\uff0c\u5224\u65ad IP \u5730\u5740\u662f\u5426\u6709\u6548\uff0c\u5e76\u4e14\u63d0\u4f9b\u4e86 <code>Is4<\/code> \u548c <code>Is6<\/code> \u65b9\u6cd5\u6765\u5224\u65ad IP \u5730\u5740\u662f IPv4 \u8fd8\u662f IPv6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n    \"net\/netip\"\n)\n\nfunc main() {\n    addr := netip.MustParseAddr(\"192.168.1.1\")\n    fmt.Println(\"IsValid:\", addr.IsValid())  \/\/ true\n    fmt.Println(\"Is IPv4:\", addr.Is4())     \/\/ true\n    fmt.Println(\"Is IPv6:\", addr.Is6())     \/\/ false\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>IsValid<\/code>\uff1a\u5224\u65ad\u5730\u5740\u662f\u5426\u6709\u6548\u3002<\/li>\n\n\n\n<li><code>Is4<\/code>\uff1a\u5224\u65ad\u5730\u5740\u662f\u5426\u4e3a IPv4\u3002<\/li>\n\n\n\n<li><code>Is6<\/code>\uff1a\u5224\u65ad\u5730\u5740\u662f\u5426\u4e3a IPv6\u3002<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3.3 <strong>IP \u5730\u5740\u6bd4\u8f83<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>netip.Addr<\/code> \u652f\u6301\u76f4\u63a5\u7684\u6bd4\u8f83\u64cd\u4f5c\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5e38\u89c4\u7684 <code>==<\/code> \u548c <code>!=<\/code> \u8fd0\u7b97\u7b26\u6765\u6bd4\u8f83\u4e24\u4e2a <code>netip.Addr<\/code> \u7c7b\u578b\u7684\u5b9e\u4f8b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n    \"net\/netip\"\n)\n\nfunc main() {\n    addr1 := netip.MustParseAddr(\"192.168.1.1\")\n    addr2 := netip.MustParseAddr(\"192.168.1.1\")\n    addr3 := netip.MustParseAddr(\"10.0.0.1\")\n\n    fmt.Println(\"addr1 == addr2:\", addr1 == addr2) \/\/ true\n    fmt.Println(\"addr1 == addr3:\", addr1 == addr3) \/\/ false\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>netip.Addr<\/code> \u7684\u6bd4\u8f83\u662f\u57fa\u4e8e\u5730\u5740\u7684\u5b57\u8282\u8868\u793a\u8fdb\u884c\u7684\uff0c\u56e0\u6b64\u5b83\u975e\u5e38\u9ad8\u6548\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">3.4 <strong>\u83b7\u53d6\u5730\u5740\u7684\u5b57\u8282\u8868\u793a<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><code>netip.Addr<\/code> \u63d0\u4f9b\u4e86 <code>AsSlice<\/code> \u65b9\u6cd5\u6765\u8fd4\u56de\u4e00\u4e2a\u5b57\u8282\u5207\u7247 (<code>[]byte<\/code>)\uff0c\u53ef\u4ee5\u7528\u4e8e\u8fdb\u4e00\u6b65\u7684\u5904\u7406\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>package main\n\nimport (\n    \"fmt\"\n    \"net\/netip\"\n)\n\nfunc main() {\n    addr := netip.MustParseAddr(\"192.168.1.1\")\n    bytes := addr.AsSlice()\n    fmt.Println(\"Address as slice:\", bytes)\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">4. <strong><code>net\/netip.Addr<\/code> \u5e38\u7528\u65b9\u6cd5\u6c47\u603b<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u65b9\u6cd5<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td><code>ParseAddr(string)<\/code><\/td><td>\u89e3\u6790 IP \u5730\u5740\u5b57\u7b26\u4e32\uff0c\u8fd4\u56de\u4e00\u4e2a <code>netip.Addr<\/code> \u548c\u9519\u8bef\u3002<\/td><\/tr><tr><td><code>MustParseAddr(string)<\/code><\/td><td>\u89e3\u6790 IP \u5730\u5740\u5b57\u7b26\u4e32\uff0c\u89e3\u6790\u5931\u8d25\u65f6\u89e6\u53d1 panic\u3002<\/td><\/tr><tr><td><code>IsValid()<\/code><\/td><td>\u5224\u65ad IP \u5730\u5740\u662f\u5426\u6709\u6548\u3002<\/td><\/tr><tr><td><code>Is4()<\/code><\/td><td>\u5224\u65ad\u662f\u5426\u4e3a IPv4 \u5730\u5740\u3002<\/td><\/tr><tr><td><code>Is6()<\/code><\/td><td>\u5224\u65ad\u662f\u5426\u4e3a IPv6 \u5730\u5740\u3002<\/td><\/tr><tr><td><code>AsSlice()<\/code><\/td><td>\u8fd4\u56de IP \u5730\u5740\u7684\u5b57\u8282\u5207\u7247\u8868\u793a\u3002<\/td><\/tr><tr><td><code>Compare()<\/code><\/td><td>\u6bd4\u8f83\u4e24\u4e2a IP \u5730\u5740\uff0c\u8fd4\u56de\u5c0f\u4e8e\u3001\u7b49\u4e8e\u6216\u5927\u4e8e\u7684\u6bd4\u8f83\u7ed3\u679c\uff08\u7c7b\u4f3c\u4e8e <code>strings.Compare<\/code>\uff09\u3002<\/td><\/tr><tr><td><code>String()<\/code><\/td><td>\u8fd4\u56de IP \u5730\u5740\u7684\u5b57\u7b26\u4e32\u8868\u793a\u5f62\u5f0f\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">5. <strong>\u6027\u80fd\u4f18\u52bf<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f8\u6bd4\u4e8e\u4f20\u7edf\u7684 <code>net.IP<\/code> \u7c7b\u578b\uff0c<code>netip.Addr<\/code> \u7684\u6027\u80fd\u63d0\u5347\u4f53\u73b0\u5728\u4ee5\u4e0b\u51e0\u4e2a\u65b9\u9762\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u96f6\u5185\u5b58\u5206\u914d<\/strong>\uff1a<code>netip.Addr<\/code> \u4f7f\u7528\u7ed3\u6784\u4f53\u5b58\u50a8 IP \u5730\u5740\uff0c\u800c\u4e0d\u662f <code>[]byte<\/code> \u7c7b\u578b\u7684\u5207\u7247\uff0c\u907f\u514d\u4e86\u9891\u7e41\u7684\u5185\u5b58\u5206\u914d\u548c\u5783\u573e\u56de\u6536\u3002<\/li>\n\n\n\n<li><strong>\u9ad8\u6548\u7684\u6bd4\u8f83\u64cd\u4f5c<\/strong>\uff1a\u7531\u4e8e <code>netip.Addr<\/code> \u91c7\u7528\u7ed3\u6784\u4f53\u8868\u793a\uff0c\u76f4\u63a5\u6bd4\u8f83\u4e24\u4e2a\u5730\u5740\u53ea\u9700\u6bd4\u8f83\u5185\u5b58\u4e2d\u7684\u5b57\u8282\u6570\u636e\uff0c\u56e0\u6b64\u6bd4 <code>net.IP<\/code> \u66f4\u52a0\u9ad8\u6548\u3002<\/li>\n\n\n\n<li><strong>\u7edf\u4e00\u5904\u7406 IPv4 \u548c IPv6<\/strong>\uff1a<code>netip.Addr<\/code> \u63d0\u4f9b\u4e86\u7edf\u4e00\u7684 API \u6765\u5904\u7406\u4e24\u79cd\u4e0d\u540c\u7684 IP \u534f\u8bae\u7c7b\u578b\uff0c\u907f\u514d\u4e86\u591a\u79cd\u7c7b\u578b\u4e4b\u95f4\u7684\u7c7b\u578b\u8f6c\u6362\u548c\u5224\u65ad\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">6. <strong>\u6700\u4f73\u5b9e\u8df5<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9009\u62e9 <code>netip.Addr<\/code> \u4f5c\u4e3a\u9ed8\u8ba4\u7684 IP \u5730\u5740\u7c7b\u578b<\/strong>\uff1a\u5728\u65b0\u5f00\u53d1\u7684\u9879\u76ee\u4e2d\uff0c\u5efa\u8bae\u4f7f\u7528 <code>netip.Addr<\/code> \u6765\u8868\u793a\u548c\u64cd\u4f5c IP \u5730\u5740\uff0c\u7279\u522b\u662f\u5bf9\u4e8e\u6027\u80fd\u8981\u6c42\u8f83\u9ad8\u7684\u5e94\u7528\u3002<\/li>\n\n\n\n<li><strong>\u907f\u514d\u9891\u7e41\u7684\u5185\u5b58\u5206\u914d<\/strong>\uff1a\u7531\u4e8e <code>netip.Addr<\/code> \u7c7b\u578b\u5185\u90e8\u7ed3\u6784\u5316\u5b58\u50a8 IP \u5730\u5740\uff0c\u56e0\u6b64\u51cf\u5c11\u4e86\u5185\u5b58\u5206\u914d\uff0c\u76f8\u6bd4 <code>net.IP<\/code> \u66f4\u9002\u5408\u9891\u7e41\u4f7f\u7528\u7684\u573a\u666f\u3002<\/li>\n\n\n\n<li><strong>\u5229\u7528\u7ed3\u6784\u4f53\u7279\u6027<\/strong>\uff1a\u53ef\u4ee5\u901a\u8fc7 <code>netip.Addr<\/code> \u7684\u5404\u79cd\u65b9\u6cd5\uff0c\u8f7b\u677e\u8fdb\u884c IP \u5730\u5740\u7684\u9a8c\u8bc1\u3001\u6bd4\u8f83\u548c\u8f6c\u6362\uff0c\u907f\u514d\u624b\u52a8\u5904\u7406\u5b57\u8282\u6570\u7ec4\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. <strong>\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Go \u7684 <code>net\/netip.Addr<\/code> \u7c7b\u578b\u662f\u5904\u7406 IP \u5730\u5740\u7684\u4e00\u4e2a\u9ad8\u6548\u3001\u7b80\u6d01\u7684\u5de5\u5177\uff0c\u5b83\u63d0\u4f9b\u4e86\u6bd4 <code>net.IP<\/code> \u66f4\u597d\u7684\u6027\u80fd\u3001\u66f4\u5c11\u7684\u5185\u5b58\u5360\u7528\u548c\u66f4\u7b80\u6d01\u7684 API\u3002\u901a\u8fc7\u5b83\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u89e3\u6790\u3001\u6bd4\u8f83\u548c\u8f6c\u6362 IP \u5730\u5740\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u7f51\u7edc\u7f16\u7a0b\u573a\u666f\u3002\u968f\u7740 Go \u8bed\u8a00\u7684\u53d1\u5c55\uff0c<code>net\/netip.Addr<\/code> \u7c7b\u578b\u7684\u4f18\u52bf\u5c06\u66f4\u52a0\u663e\u73b0\uff0c\u6210\u4e3a Go \u5f00\u53d1\u8005\u5904\u7406 IP \u5730\u5740\u7684\u9996\u9009\u5de5\u5177\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Go \u8bed\u8a00\u4e2d\uff0c\u7f51\u7edc\u7f16\u7a0b\u662f\u4e00\u4e2a\u91cd\u8981\u7684\u7ec4\u6210\u90e8\u5206\uff0c\u800c\u5904\u7406 IP \u5730\u5740\u662f\u51e0\u4e4e\u6240\u6709\u7f51\u7edc\u5e94\u7528\u7684\u57fa\u672c\u9700\u6c42\u4e4b\u4e00\u3002Go \u6807\u51c6 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[],"class_list":["post-987","post","type-post","status-publish","format-standard","hentry","category-golang"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=987"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/987\/revisions"}],"predecessor-version":[{"id":988,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/987\/revisions\/988"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}