{"id":70,"date":"2022-04-03T15:17:37","date_gmt":"2022-04-03T06:17:37","guid":{"rendered":"https:\/\/doka2000gt.blog\/?p=70"},"modified":"2022-12-15T14:59:31","modified_gmt":"2022-12-15T05:59:31","slug":"post-70","status":"publish","type":"post","link":"https:\/\/doka2000gt.blog\/?p=70","title":{"rendered":"[memo #2] \u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u95a2\u6570\uff08\u7b2c\u4e00\u7d1a\u95a2\u6570\uff09"},"content":{"rendered":"\n<div class=\"wp-block-luxe-blocks-profile\" style=\"margin-top:10px;margin-bottom:30px\"><div class=\"luxe-pf-cont\" style=\"border:4px double #999;border-radius:4px;padding:20px 10px 10px 10px\"><div class=\"luxe-pf-wrap\"><div class=\"luxe-pf-title-wrap\" style=\"margin:-20px 0 0 -10px;padding:3px 12px;color:#fff;background-color:#333;border-radius:0 0 4px 0\"><span class=\"luxe-pf-icon\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 1 24 28\"><path d=\"M5.672 24l1.422-1.422-3.672-3.672-1.422 1.422v1.672h2v2h1.672zM13.844 9.5c0-0.203-0.141-0.344-0.344-0.344-0.094 0-0.187 0.031-0.266 0.109l-8.469 8.469c-0.078 0.078-0.109 0.172-0.109 0.266 0 0.203 0.141 0.344 0.344 0.344 0.094 0 0.187-0.031 0.266-0.109l8.469-8.469c0.078-0.078 0.109-0.172 0.109-0.266zM13 6.5l6.5 6.5-13 13h-6.5v-6.5zM23.672 8c0 0.531-0.219 1.047-0.578 1.406l-2.594 2.594-6.5-6.5 2.594-2.578c0.359-0.375 0.875-0.594 1.406-0.594s1.047 0.219 1.422 0.594l3.672 3.656c0.359 0.375 0.578 0.891 0.578 1.422z\" fill=\"#fff\"><\/path><\/svg><\/span><span class=\"luxe-pf-title\">golamg\u30de\u30a4\u30e1\u30e2<\/span><\/div><div class=\"luxe-pf-main\" style=\"padding:20px 0 10px 0\"><figure style=\"float:left;max-width:25%\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/doka2000gt.blog\/wp-content\/uploads\/2022\/04\/golang-post.png\" alt=\"\" width=\"800\" height=\"500\"\/><\/figure><div class=\"luxe-pf-text-wrap\" style=\"flex:1\"><p class=\"luxe-pf-text\" style=\"margin:0\">Go\u8a00\u8a9e\u3092\u5b66\u3076\u305f\u3081\u306b\u300c<a href=\"https:\/\/www.amazon.co.jp\/%E5%85%A5%E9%96%80Go%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0-Nathan-Youngman\/dp\/4798158658\/ref=asc_df_4798158658\/?tag=jpgo-22&amp;linkCode=df0&amp;hvadid=312700511651&amp;hvpos=&amp;hvnetw=g&amp;hvrand=8884849083377313715&amp;hvpone=&amp;hvptwo=&amp;hvqmt=&amp;hvdev=c&amp;hvdvcmdl=&amp;hvlocint=&amp;hvlocphy=1009208&amp;hvtargid=pla-677422395975&amp;psc=1&amp;th=1&amp;psc=1\">\u5165\u9580Go\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0<\/a>\u300d\u3092\u8aad\u307f\u9032\u3081\u306a\u304c\u3089\u3001\u81ea\u5206\u304c\u7406\u89e3\u3092\u6df1\u3081\u308b\u305f\u3081\u306b\u30dd\u30a4\u30f3\u30c8\u3084\u7df4\u7fd2\u7d50\u679c\u306a\u3069\u3092\u6b8b\u3057\u305f\u81ea\u5206\u7528\u30e1\u30e2\u3002<\/p><\/div><\/div><\/div><div style=\"clear:both\"><\/div><\/div><\/div>\n\n\n\n<p>Go\u3067\u306f\u3001\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3057\u305f\u308a\u3001\u5f15\u6570\u3084\u623b\u308a\u5024\u3068\u3057\u3066\u95a2\u6570\u3092\u6e21\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u3069\u3053\u3067\u3082\u95a2\u6570\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u3053\u306e\u3088\u3046\u306a\u95a2\u6570\u306f\u300c\u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u300d\uff08\u7b2c\u4e00\u7d1a\u95a2\u6570\uff09\u3068\u547c\u3070\u308c\u308b\u306e\u3060\u305d\u3046\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30fc\u30c9\u4f8b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport (\n    &quot;fmt&quot;\n    &quot;math\/rand&quot;\n)\n\ntype year int\n\nfunc randShowa() year {    \/\/ 1925\u5e74\uff08\u662d\u548c\u5143\u5e74\uff09\u304b\u30891989\u5e74\uff08\u662d\u548c64\u5e74\uff09\u307e\u3067\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u6c42\u3081\u308b\u95a2\u6570\n        return year(rand.Intn(64) + 1925)\n}\n\nfunc main() {\n        seireki := randShowa    \/\/ \u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b\n        fmt.Printf(&quot;\u897f\u66a6%v\u5e74\\n&quot;, seireki())\n}<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9f\u884c\u4f8b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>\u897f\u66a61958\u5e74<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-topic\" style=\"margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-topic-title\" style=\"color:#fff;background-color:#006edc;border:1px solid #006edc;padding:2px 14px;display:inline-flex;align-items:center\">\u30dd\u30a4\u30f3\u30c8<\/div><div class=\"wp-block-luxe-blocks-topic-content\" style=\"border:1px solid #006edc;padding:0px 15px 0px 15px \">\n<ul class=\"wp-block-list\">\n<li>\u4e0a\u8a18\u30b3\u30fc\u30c9\u306e14\u884c\u76ee\u3067seireki\u5909\u6570\u306b\u4ee3\u5165\u3057\u3066\u3044\u308b\u306e\u306f\u3001\u95a2\u6570\u547c\u3073\u51fa\u3057\u306e\u7d50\u679c\u3067\u306f\u306a\u304fconvShowa\u95a2\u6570\u305d\u306e\u3082\u306e\u3002<\/li>\n\n\n\n<li>\u666e\u901a\u3001\u95a2\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u969b\u306f()\u3092\u4ed8\u3051\u308b\u304c\u3001\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b\u5834\u5408\u306b\u306f()\u3092\u4ed8\u3051\u306a\u3044\u3002<\/li>\n\n\n\n<li>\u305d\u306e\u5f8c\u306f\u5909\u6570seireki\u304c\u3001\u4ee3\u5165\u3055\u308c\u305f\u95a2\u6570\u3068\u3057\u3066\u632f\u308b\u821e\u3046\u3002\u306a\u306e\u3067\u95a2\u6570\u3092\u8907\u6570\u7528\u610f\u3057\u3066\u304a\u304d\u3001\u72b6\u6cc1\u306b\u5fdc\u3058\u3066\u5909\u6570\u306b\u4ee3\u5165\u3059\u308b\u95a2\u6570\u3092\u5206\u5c90\u3055\u305b\u308b\u3053\u3068\u306b\u3088\u308a\u3001\u591a\u5f69\u306a\u52d5\u4f5c\u3092\u3059\u308b\u8a18\u8ff0\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-notification\" style=\"display:table;margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-notification-icon\" style=\"color:#fff;background-color:#006edc;padding:14px;display:table-cell\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 1 24 28\"><path d=\"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z\" fill=\"#fff\"><\/path><\/svg><\/div><div class=\"wp-block-luxe-blocks-notification-content\" style=\"display:table-cell;width:100%;background-color:#d5eaff;padding:0px 15px 0px 15px \">\n<p>\u4e0a\u8a18\u306e\u5909\u6570seireki\u306f\u300c\u95a2\u6570\u578b\u300d\u3067\u3042\u308a\u3001\u305d\u306e\u95a2\u6570\u306f\u5f15\u6570\u3092\u53d6\u3089\u305a\u306byear\u306e\u7d50\u679c\u3092\u8fd4\u3059\u3060\u3051\u306e\u305f\u3081\u3001\u578b\u63a8\u8ad6\u3092\u5fc5\u8981\u3068\u3057\u306a\u3044\u3002\u3053\u306e\u3088\u3046\u306b\u578b\u63a8\u8ad6\u306b\u983c\u3089\u306a\u3044\u3068\u304d\u306f\u3001\u5909\u6570seireki\u3092\u6b21\u306e\u3088\u3046\u306b\u5ba3\u8a00\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>var seireki func() year<\/code><\/pre><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u95a2\u6570\u3092\u4ed6\u306e\u95a2\u6570\u306b\u6e21\u3059<\/h2>\n\n\n\n<p>\u95a2\u6570\u3092\u5909\u6570\u306b\u4ee3\u5165\u51fa\u6765\u308b\u3068\u3044\u3046\u3053\u3068\u306f\u3001\u305d\u306e\u307e\u307e\u5f15\u6570\u3068\u3057\u3066\u4ed6\u306e\u95a2\u6570\u306b\u6e21\u3059\u3053\u3068\u304c\u51fa\u6765\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002\u3069\u3093\u306a\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u306e\u3060\u308d\u3046\u304b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b3\u30fc\u30c9\u4f8b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport (\n    &quot;fmt&quot;\n    &quot;math\/rand&quot;\n    &quot;time&quot;\n)\n\ntype year int\n\n\/\/ \u7b2c2\u5f15\u6570\u3068\u3057\u3066\u95a2\u6570\u3092\u53d7\u3051\u53d6\u308b\u95a2\u6570\nfunc getRandYear(times int, seireki func() year) {\n    for i := 0; i &lt; times; i++ {\n        y := seireki()\n        fmt.Printf(&quot;%v\u5e74\\n&quot;, y)\n        time.Sleep(time.Second)\n    }\n}\n\nfunc getShowa() year {\n    return year(rand.Intn(64) + 1925)\n}\n\nfunc main() {\n    \/\/ \u7b2c2\u5f15\u6570\u3068\u3057\u3066\u95a2\u6570\u540d\u3092\u95a2\u6570\u306b\u6e21\u3059\n    getRandYear(3, getShowa)\n}<\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b9f\u884c\u4f8b<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>1958\u5e74\n1940\u5e74\n1932\u5e74<\/code><\/pre><\/div>\n\n\n\n<p>getRandYear\u95a2\u6570\u306e\u7b2c2\u5f15\u6570\u306e\u578b\u306f\u300cfunc() year\u300d\u3060\u304c\u3001\u540c\u3058\u578b\u3092\u6301\u3064\u5909\u6570\u306e\u5ba3\u8a00\u306b\u4f3c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>var getRandYear func() year<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-notification\" style=\"display:table;margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-notification-icon\" style=\"color:#fff;background-color:#006edc;padding:14px;display:table-cell\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 1 24 28\"><path d=\"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z\" fill=\"#fff\"><\/path><\/svg><\/div><div class=\"wp-block-luxe-blocks-notification-content\" style=\"display:table-cell;width:100%;background-color:#d5eaff;padding:0px 15px 0px 15px \">\n<p>\u95a2\u6570\u3092\u5f15\u6570\u3068\u3057\u3066\u4ed6\u306e\u95a2\u6570\u306b\u6e21\u3059\u4e8b\u306b\u3088\u308a\u3001\u30b3\u30fc\u30c9\u3092\u5206\u5272\u3057\u3066\u518d\u5229\u7528\u3057\u3084\u3059\u304f\u306a\u308b\u3068\u3044\u3046\u30e1\u30ea\u30c3\u30c8\u304c\u3042\u308b\u3002<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u95a2\u6570\u578b\u3092\u5ba3\u8a00\u3059\u308b<\/h2>\n\n\n\n<p>\u3042\u308b\u95a2\u6570\u306e\u305f\u3081\u306b\u65b0\u3057\u3044\u578b\u3092\u5ba3\u8a00\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u305d\u306e\u95a2\u6570\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u30b3\u30fc\u30c9\u3092\u77ed\u304f\u3057\u3001\u3088\u308a\u7c21\u6f54\u660e\u77ad\u306b\u66f8\u304f\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u307e\u3067\u306b\u3001\u5e74\u53f7\u3092\u8868\u73fe\u3059\u308b\u305f\u3081\u306byear\u578b\u3092\u4f7f\u3063\u305f\u306e\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u5f15\u6570\u3068\u3057\u3066\u4f7f\u3044\u56de\u3059\u95a2\u6570\u306b\u3064\u3044\u3066\u3082\u540c\u69d8\u306e\u66f8\u304d\u65b9\u304c\u53ef\u80fd\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>type seireki func() year<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306e\u610f\u5473\u306f\u3001\u5358\u306b\u300c\u5f15\u6570\u3092\u53d7\u3051\u53d6\u3089\u305a\u306byear\u578b\u3092\u8fd4\u3059\u95a2\u6570\u300d\u3068\u3044\u3046\u306e\u3067\u306f\u306a\u304f\u3001\u300cseireki\u578b\u306e\u95a2\u6570\u300d\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\u3002\u3053\u306e\u578b\u306b\u306f\u3001\u4ed6\u306e\u30b3\u30fc\u30c9\u3092\u51dd\u7e2e\u3059\u308b\u52b9\u679c\u304c\u3042\u308b\u306e\u3067\u3001<code>func getRandYear(times int, seireki func() year)<\/code>\u3068\u3044\u3046\u30b3\u30fc\u30c9\u3092\u6b21\u306e\u3088\u3046\u306b\u66f8\u304f\u3053\u3068\u304c\u51fa\u6765\u308b\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>func getRandYear(times int, s seireki)<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-notification\" style=\"display:table;margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-notification-icon\" style=\"color:#fff;background-color:#006edc;padding:14px;display:table-cell\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 1 24 28\"><path d=\"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z\" fill=\"#fff\"><\/path><\/svg><\/div><div class=\"wp-block-luxe-blocks-notification-content\" style=\"display:table-cell;width:100%;background-color:#d5eaff;padding:0px 15px 0px 15px \">\n<p>\u3053\u306e\u4f8b\u3060\u3051\u3067\u306f\u3001\u4eca\u3072\u3068\u3064\u6539\u5584\u3068\u306f\u601d\u3048\u306a\u3044\u3002\u3053\u306e\u30b3\u30fc\u30c9\u3092\u898b\u305f\u3068\u304d\u306b\u300cseireki\u300d\u3068\u306f\u4f55\u304b\u3092\u77e5\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308b\u304b\u3089\u3067\u3042\u308b\u3002\u3060\u304c\u3001seireki\u3092\u3042\u3061\u3053\u3061\u3067\u4f7f\u3046\u5834\u5408\u3084\u3001\u95a2\u6570\u306b\u305f\u304f\u3055\u3093\u306e\u5f15\u6570\u304c\u3042\u308b\u5834\u5408\u306b\u306f\u3001\u578b\u3092\u4f7f\u3046\u3053\u3068\u3067\u30b4\u30c1\u30e3\u30b4\u30c1\u30e3\u3057\u305f\u30b3\u30fc\u30c9\u3092\u30b9\u30c3\u30ad\u30ea\u3068\u6574\u7406\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u306f\u305a\u3060\u3002<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u3068\u7121\u540d\u95a2\u6570<\/h2>\n\n\n\n<div class=\"wp-block-luxe-blocks-profile\" style=\"margin-top:10px;margin-bottom:30px\"><div class=\"luxe-pf-cont\" style=\"border:4px double #999;border-radius:4px;padding:20px 10px 10px 10px\"><div class=\"luxe-pf-wrap\"><div class=\"luxe-pf-title-wrap\" style=\"margin:-20px 0 0 -10px;padding:3px 12px;color:#fff;background-color:#333;border-radius:0 0 4px 0\"><span class=\"luxe-pf-icon\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"16\" height=\"16\" viewBox=\"0 1 24 28\"><path d=\"M5.672 24l1.422-1.422-3.672-3.672-1.422 1.422v1.672h2v2h1.672zM13.844 9.5c0-0.203-0.141-0.344-0.344-0.344-0.094 0-0.187 0.031-0.266 0.109l-8.469 8.469c-0.078 0.078-0.109 0.172-0.109 0.266 0 0.203 0.141 0.344 0.344 0.344 0.094 0 0.187-0.031 0.266-0.109l8.469-8.469c0.078-0.078 0.109-0.172 0.109-0.266zM13 6.5l6.5 6.5-13 13h-6.5v-6.5zM23.672 8c0 0.531-0.219 1.047-0.578 1.406l-2.594 2.594-6.5-6.5 2.594-2.578c0.359-0.375 0.875-0.594 1.406-0.594s1.047 0.219 1.422 0.594l3.672 3.656c0.359 0.375 0.578 0.891 0.578 1.422z\" fill=\"#fff\"><\/path><\/svg><\/span><span class=\"luxe-pf-title\">\u7121\u540d\u95a2\u6570\u3068\u306f\uff1f\u3000\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u3068\u306f\uff1f<\/span><\/div><div class=\"luxe-pf-main\" style=\"padding:20px 0 10px 0\"><div class=\"luxe-pf-text-wrap\" style=\"flex:1\"><p class=\"luxe-pf-text\" style=\"margin:0\">\u7121\u540d\u95a2\u6570\u3068\u306f\u3001Go\u3067\u306f\u300c\u95a2\u6570\u30ea\u30c6\u30e9\u30eb\u300d\u3068\u3082\u547c\u3070\u308c\u308b\u3001\u540d\u524d\u3092\u6301\u305f\u306a\u3044\u95a2\u6570\u306e\u3053\u3068\u3002\u666e\u901a\u306e\u95a2\u6570\u3068\u9055\u3044\u3001\u30b9\u30b3\u30fc\u30d7\u306e\u5916\u5074\u306b\u304a\u3044\u3066\u3082\u81ea\u5206\u306e\u30b9\u30b3\u30fc\u30d7\u5185\u306b\u3042\u308b\u5909\u6570\u306e\u5024\uff08\u53c2\u7167\uff09\u3092\u4fdd\u6301\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3068\u3044\u3046\u7279\u5fb4\u3092\u6301\u3061\u3001\u3053\u306e\u6a5f\u80fd\u3092\u300c\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u300d\u3068\u547c\u3076\u3002<\/p><\/div><\/div><\/div><div style=\"clear:both\"><\/div><\/div><\/div>\n\n\n\n<p>\u4f7f\u3044\u65b9\u3068\u3057\u3066\u3001\u4f8b\u3048\u3070\u7121\u540d\u95a2\u6570\u3092\u5909\u6570\u306b\u4ee3\u5165\u3057\u3066\u304a\u3051\u3070\u3001\u305d\u306e\u5909\u6570\u306f\u4ed6\u306e\u95a2\u6570\u3068\u540c\u3058\u3088\u3046\u306b\u4f7f\u3046\u3053\u3068\u304c\u51fa\u6765\u308b\u3002\u307e\u305f\u3001<b>\u305d\u306e\u5909\u6570\u306e\u5ba3\u8a00\u5834\u6240\u306f\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u3067\u3082\u30ed\u30fc\u30ab\u30eb\u3067\u3082\u69cb\u308f\u306a\u3044<\/b>\u3002\u4ee5\u4e0b\u306b\u4f8b\u3092\u793a\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport &quot;fmt&quot;\n\n\/\/ \u30b0\u30ed\u30fc\u30d0\u30eb\u3067\u306e\u5ba3\u8a00\nvar f1 = func() {  \/\/ \u7121\u540d\u95a2\u6570\u3092\u5909\u6570\u306b\u4ee3\u5165\n    fmt.Println(&quot;(1) \u30d1\u30c3\u30b1\u30fc\u30b8\u30b9\u30b3\u30fc\u30d7\u3067\u5ba3\u8a00\u3057\u305f\u7121\u540d\u95a2\u6570\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002&quot;)\n}\n\nfunc main() {\n    f1() \/\/ \u7121\u540d\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\n\n    \/\/ \u30ed\u30fc\u30ab\u30eb\u3067\u306e\u5ba3\u8a00\n    var f2 = func(message string) {  \/\/ \u7121\u540d\u95a2\u6570\u3092\u5909\u6570\u306b\u4ee3\u5165\n        fmt.Println(message)\n    }\n    f2(&quot;(2) \u95a2\u6570\u5185\u3067\u5ba3\u8a00\u3057\u305f\u7121\u540d\u95a2\u6570\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002&quot;)  \/\/ \u7121\u540d\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\n}\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>(1) \u30d1\u30c3\u30b1\u30fc\u30b8\u30b9\u30b3\u30fc\u30d7\u3067\u5ba3\u8a00\u3057\u305f\u7121\u540d\u95a2\u6570\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002\n(2) \u95a2\u6570\u5185\u3067\u5ba3\u8a00\u3057\u305f\u7121\u540d\u95a2\u6570\u304c\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002\n<\/code><\/pre><\/div>\n\n\n\n<p>\n    \u307e\u305f\u3001\u6b21\u306e\u4f8b\u306e\u3088\u3046\u306b\u7121\u540d\u95a2\u6570\u306e\u5ba3\u8a00\u3068\u547c\u3073\u51fa\u3057\u30921\u30b9\u30c6\u30c3\u30d7\u3067\u884c\u3046\u3053\u3068\u3082\u51fa\u6765\u308b\u3002\n<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport &quot;fmt&quot;\n\nfunc main() {\n    func() { \/\/ \u7121\u540d\u95a2\u6570\u306e\u5ba3\u8a00\n        fmt.Println(&quot;\u7121\u540d\u95a2\u6570\u304c\u5ba3\u8a00\u3055\u308c\u3001\u305d\u306e\u307e\u307e\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002&quot;)\n    }()  \/\/ \u7121\u540d\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\n}\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>\u7121\u540d\u95a2\u6570\u304c\u5ba3\u8a00\u3055\u308c\u3001\u305d\u306e\u307e\u307e\u5b9f\u884c\u3055\u308c\u307e\u3057\u305f\u3002\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-notification\" style=\"display:table;margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-notification-icon\" style=\"color:#fff;background-color:#006edc;padding:14px;display:table-cell\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 1 24 28\"><path d=\"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z\" fill=\"#fff\"><\/path><\/svg><\/div><div class=\"wp-block-luxe-blocks-notification-content\" style=\"display:table-cell;width:100%;background-color:#d5eaff;padding:0px 15px 0px 15px \">\n<p>\n    \u7121\u540d\u95a2\u6570\u306f\u3001\u4f8b\u3048\u3070\u4ed6\u306e\u95a2\u6570\u304b\u3089\u95a2\u6570\u3092\u8fd4\u3059\u3068\u304d\u306a\u3069\u3001\u305d\u306e\u5834\u3067\u4f5c\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408\u306b\u4fbf\u5229\u306b\u4f7f\u3048\u308b\u3002\u5c11\u306a\u304f\u3068\u3082\u3001\u308f\u3056\u308f\u3056\u95a2\u6570\u540d\u3092\u5225\u9014\u5ba3\u8a00\u3057\u3066\u304a\u3044\u3066\u623b\u308a\u5024\u306b\u6307\u5b9a\u3059\u308b\u3088\u308a\u3082\u9065\u304b\u306b\u30e9\u30af\u3067\u3042\u308b\u3002\n<\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\n    \u5b9f\u969b\u306b\u4f7f\u3063\u3066\u307f\u308b\n<\/h2>\n\n\n\n<p>\n    \u6b21\u306e\u30b3\u30fc\u30c9\u3067\u306f\u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u95a2\u6570\u3092\u7528\u3044\u3066\u3001\u897f\u66a6\u304b\u3089\u662d\u548c\u4f55\u5e74\u304b\u3092\u6c42\u3081\u308b\u3002\u5168\u304f\u610f\u5473\u306e\u306a\u3044\u30b3\u30fc\u30c9\u3067\u7533\u3057\u8a33\u306a\u3044\u3002\n<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport &quot;fmt&quot;\n\ntype year int\n\n\/\/ showa\u95a2\u6570\u578b\ntype showa func() year\n\nfunc calcSeireki() year {\n    return 1988\n}\n\nfunc getShowa(s showa, offset year) showa {\n    return func() year {  \/\/ \u7121\u540d\u95a2\u6570\u3092\u5ba3\u8a00\u3057\u3066\u8fd4\u3059\n        return s() + offset\n    }\n}\n\nfunc main() {\n    ansYear := getShowa(calcSeireki, -1925)\n    fmt.Printf(&quot;\u662d\u548c%v\u5e74\\n&quot;, ansYear())\n}\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>\u662d\u548c63\u5e74\n<\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-topic\" style=\"margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-topic-title\" style=\"color:#fff;background-color:#006edc;border:1px solid #006edc;padding:2px 14px;display:inline-flex;align-items:center\">\u30dd\u30a4\u30f3\u30c8<\/div><div class=\"wp-block-luxe-blocks-topic-content\" style=\"border:1px solid #006edc;padding:0px 15px 0px 15px \">\n<p>\u4e0a\u8a18\u306e\u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u95a2\u6570\u3092\u4f7f\u3046getShowa\u95a2\u6570\u306f\u3001\u897f\u66a6\u3092\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u53d7\u3051\u53d6\u308a\u3001\u4ee3\u66ff\u3068\u306a\u308b\u95a2\u6570\u3092\u8fd4\u3057\u3066\u3044\u308b\u3002\u3053\u306e\u65b0\u3057\u3044showa\u578b\u95a2\u6570\u306f\u3001\u547c\u3073\u51fa\u3055\u308c\u308b\u3068\u5143\u306e\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u3001\u897f\u66a6\u3092\u30aa\u30d5\u30bb\u30c3\u30c8\u3067\u88dc\u6b63\u3057\u3066\u3044\u308b\u3002 <\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-notification\" style=\"display:table;margin-top:10px;margin-bottom:30px\"><div class=\"wp-block-luxe-blocks-notification-icon\" style=\"color:#fff;background-color:#006edc;padding:14px;display:table-cell\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 1 24 28\"><path d=\"M16 21.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-1.5v-8c0-0.281-0.219-0.5-0.5-0.5h-5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h1.5v5h-1.5c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h7c0.281 0 0.5-0.219 0.5-0.5zM14 7.5v-2.5c0-0.281-0.219-0.5-0.5-0.5h-3c-0.281 0-0.5 0.219-0.5 0.5v2.5c0 0.281 0.219 0.5 0.5 0.5h3c0.281 0 0.5-0.219 0.5-0.5zM24 14c0 6.625-5.375 12-12 12s-12-5.375-12-12 5.375-12 12-12 12 5.375 12 12z\" fill=\"#fff\"><\/path><\/svg><\/div><div class=\"wp-block-luxe-blocks-notification-content\" style=\"display:table-cell;width:100%;background-color:#d5eaff;padding:0px 15px 0px 15px \">\n<p><p>     \u4e0a\u8a18\u306e\u7121\u540d\u95a2\u6570\u306f\u3001\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001<b>getShowa<\/b>\u95a2\u6570\u304c\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u53d7\u3051\u53d6\u3063\u305f<b>s<\/b>\u3068<b>offset<\/b>\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u304c\u3001\u305f\u3068\u3048<b>getShowa<\/b>\u95a2\u6570\u304c\u30ea\u30bf\u30fc\u30f3\u3057\u305f\u5f8c\u3067\u3082\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u306b\u3088\u3063\u3066\u30ad\u30e3\u30d7\u30c1\u30e3\u30fc\u3055\u308c\u305f\u5909\u6570\u306f\u4fdd\u6301\u3055\u308c\u308b\u7279\u5fb4\u3092\u6301\u3063\u3066\u3044\u308b\u3002\u3060\u304b\u3089\u3053\u305d\u3001<b>ansYear<\/b>\u306e\u547c\u3073\u51fa\u3057\u3067<b>s<\/b>\u304a\u3088\u3073<b>offset<\/b>\u306b\u30a2\u30af\u30bb\u30b9\u51fa\u6765\u305f\u8a33\u3060\u3002\u3053\u306e\u3088\u3046\u306b\u7121\u540d\u95a2\u6570\u3068\u306f\u3001\u305d\u306e\u30b9\u30b3\u30fc\u30d7\u306b\u3042\u308b\u5909\u6570\u3092\u5305\u307f\u8fbc\u3093\u3067\u4fdd\u6301\u3059\u308b\u50cd\u304d\u304b\u3089\u300c<b>\u30af\u30ed\u30fc\u30b8\u30e3\u30fc<\/b>\u300d\uff08\u9589\u5305\uff09\u3068\u547c\u3070\u308c\u308b\u306e\u3067\u3042\u308b\u3002 <\/p> <p>     \u3061\u306a\u307f\u306b\u3001\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u306f\u9589\u5305\u3059\u308b\u5909\u6570\u306e\u5024\u3092\u30b3\u30d4\u30fc\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001<b>\u305d\u306e\u5909\u6570\u3078\u306e\u300c\u53c2\u7167\u300d\u3092\u4fdd\u6301\u3059\u308b<\/b>\u306e\u3067\u3001\u5143\u306e\u5909\u6570\u3092\u5909\u66f4\u3059\u308b\u3068\u7121\u540d\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u7d50\u679c\u306b\u53cd\u6620\u3055\u308c\u308b\u3002 <\/p><\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport &quot;fmt&quot;\n\nfunc main() {\n    num := 999\n\n    answer := func() int {\n        return num\n    }\n\n    fmt.Println(answer())  \/\/ -&gt; 999\n\n    num++\n\n    fmt.Println(answer())  \/\/ -&gt; 1000\n}\n<\/code><\/pre><\/div>\n\n\n\n<p><strong>\u203b\u7279\u306b\u3001for\u30eb\u30fc\u30d7\u306e\u4e2d\u3067\u30af\u30ed\u30fc\u30b8\u30e3\u30fc\u3092\u4f7f\u3046\u3068\u304d\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3002<\/strong><\/p>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30c1\u30e3\u30ec\u30f3\u30b8<\/h2>\n\n\n\n<p>\u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u95a2\u6570\u3092\u7528\u3044\u3066\u3001\u897f\u66a6\u304b\u3089\u662d\u548c\u306b\u63db\u7b97\u3059\u308b\u8868\u3092\u51fa\u529b\u3055\u305b\u308b\u3002<\/p>\n\n\n\n<div class=\"wp-block-luxe-blocks-accordion\" style=\"margin-top:10px;margin-bottom:30px\"><input id=\"5032d98787b1db275bebce6353b8\" class=\"acb\" type=\"checkbox\" style=\"display:none\"\/><label class=\"acl\" for=\"5032d98787b1db275bebce6353b8\" style=\"color:#fff;background-color:#006edc;border:1px solid #006edc;display:flex;margin:0\"><div class=\"act\" style=\"padding:5px 15px;flex:1 0\"><span>\u51fa\u529b\u4f8b<\/span><\/div><div class=\"aci\" style=\"margin:5px 0;padding:0 15px;border-left:1px solid #fff\"><\/div><\/label><div class=\"acc\" style=\"border:1px solid #006edc\">\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>|       AD |    SHOWA |\n=======================\n|     1950 |       25 |\n|     1955 |       30 |\n|     1960 |       35 |\n|     1965 |       40 |\n|     1970 |       45 |\n|     1975 |       50 |\n|     1980 |       55 |\n|     1985 |       60 |\n-----------------------<\/code><\/pre><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-luxe-blocks-accordion\" style=\"margin-top:10px;margin-bottom:30px\"><input id=\"3aabad7988277d7c0d4cd46b4919\" class=\"acb\" type=\"checkbox\" style=\"display:none\"\/><label class=\"acl\" for=\"3aabad7988277d7c0d4cd46b4919\" style=\"color:#fff;background-color:#006edc;border:1px solid #006edc;display:flex;margin:0\"><div class=\"act\" style=\"padding:5px 15px;flex:1 0\"><span>\u30b3\u30fc\u30c9\u4f8b<\/span><\/div><div class=\"aci\" style=\"margin:5px 0;padding:0 15px;border-left:1px solid #fff\"><\/div><\/label><div class=\"acc\" style=\"border:1px solid #006edc\">\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-go\" data-lang=\"Go\"><code>package main\n\nimport (\n\t&quot;fmt&quot;\n)\n\n\/\/ \u578b\u306e\u5b9a\u7fa9\ntype seireki uint64\ntype showa uint64\n\n\/\/ \u897f\u66a6\u304b\u3089\u662d\u548c\u306b\u63db\u7b97\u3059\u308b\u30e1\u30bd\u30c3\u30c9\n\/\/ \uff08seireki\u578b\u306e\u5024\u3092\u53d7\u3051\u53d6\u3063\u3066\u63db\u7b97\u5f8c\u3001showa\u578b\u306b\u578b\u5909\u63db\u3057\u3066\u623b\u3059\uff09\nfunc (ad seireki) getShowa() showa {\n\treturn showa(ad - 1925)\n}\n\n\/\/ \u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u985e\u306e\u5b9a\u7fa9\nconst (\n\tline         = &quot;=======================&quot;\n\tline2        = &quot;-----------------------&quot;\n\trowFormat    = &quot;| %8s | %8s |\\n&quot;\n\tnumberFormat = &quot;%d&quot;\n)\n\n\/* ------------------------------------------------------------\n\tdrawTable:\t2\u5217\u306e\u8868\u3092\u51fa\u529b\u3059\u308b\u95a2\u6570\n   ------------------------------------------------------------\n\u3010\u5f15\u6570\u3011\n\thdr1, hdr2 (string)\t:\t\u8868\u306e\u5404\u5217\u306b\u51fa\u529b\u3059\u308b\u6587\u5b57\u5217\n\trows (int)\t\t\t:\t\u51fa\u529b\u3059\u308b\u8868\u306e\u884c\u6570\n\tgetRow (getRowFn)\t:\n\t\t\u5404\u884c\u306b\u8868\u793a\u51fa\u529b\u3059\u308b\u5185\u5bb9\u3092\u53d6\u5f97\u3059\u308b\u95a2\u6570\n\t\t\t\u3010\u5f15\u6570\u3011\n\t\t\t\trow (int)\t\t\t:\t\u3044\u307e\u4f55\u884c\u76ee\u304b\n\t\t\t\u3010\u623b\u308a\u5024\u3011\n\t\t\t\t(string, string)\t:\t\u305d\u306e\u884c\u306b\u51fa\u529b\u3059\u3079\u304d\u63db\u7b97\u7d50\u679c\n\u3010\u623b\u308a\u5024\u3011\n\t\u306a\u3057\n------------------------------------------------------------ *\/\ntype getRowFn func(row int) (string, string)\n\nfunc drawTable(hdr1, hdr2 string, rows int, getRow getRowFn) {\n\tfmt.Println(line)\n\tfmt.Printf(rowFormat, hdr1, hdr2)\n\tfmt.Println(line)\n\tfor row := 0; row &lt; rows; row++ {\n\t\tcell1, cell2 := getRow(row)\n\t\tfmt.Printf(rowFormat, cell1, cell2)\n\t}\n\tfmt.Println(line2)\n}\n\n\/\/ \u897f\u66a6\u304b\u3089\u662d\u548c\u306b\u63db\u7b97\u3059\u308b\u95a2\u6570\nfunc ad_to_sw(row int) (string, string) {\n\tad := seireki(row*5 + 1950)            \/\/ seireki\u578b\u306b\u578b\u5909\u63db\n\tsw := ad.getShowa()                    \/\/ \u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\n\tcell1 := fmt.Sprintf(numberFormat, ad) \/\/ \u51fa\u529b\u3059\u308b\u6587\u5b57\u5217\u3092\u6e96\u5099\n\tcell2 := fmt.Sprintf(numberFormat, sw) \/\/ \u540c\u4e0a\n\treturn cell1, cell2\n}\n\nfunc main() {\n\tdrawTable(&quot;AD&quot;, &quot;SHOWA&quot;, 8, ad_to_sw)\n}<\/code><\/pre><\/div>\n\n\n\n<p>drawTable\u95a2\u6570\u3067\u306f\u3001\u5f15\u6570\u306e\u6700\u5f8c\u3067\u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u95a2\u6570getRaw\u3092\u53d7\u3051\u53d6\u3063\u3066\u304a\u308a\u3001\u3053\u306e\u95a2\u6570\u304c\u547c\u3073\u51fa\u3055\u308c\u308b\u4e8b\u306b\u3088\u308a\u3001\u5404\u5217\u306b\u8868\u793a\u3059\u308b\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u3002<\/p>\n<\/div><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Go\u3067\u306f\u3001\u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3057\u305f\u308a\u3001\u5f15\u6570\u3084\u623b\u308a\u5024\u3068\u3057\u3066\u95a2\u6570\u3092\u6e21\u3057\u305f\u308a\u3059\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u3001\u3069\u3053\u3067\u3082\u95a2\u6570\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u3053\u306e\u3088\u3046\u306a\u95a2\u6570\u306f\u300c\u30d5\u30a1\u30fc\u30b9\u30c8\u30af\u30e9\u30b9\u300d\uff08\u7b2c\u4e00\u7d1a\u95a2\u6570\uff09\u3068\u547c\u3070\u308c\u308b\u306e\u3060\u305d\u3046\u3002 \u5909\u6570\u306b\u95a2\u6570\u3092\u4ee3\u5165\u3059\u308b \u30b3\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":68,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"series":[9],"class_list":["post-70","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-golang","series-golang_mymemo"],"_links":{"self":[{"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/posts\/70","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=70"}],"version-history":[{"count":23,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/posts\/70\/revisions\/228"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=\/wp\/v2\/media\/68"}],"wp:attachment":[{"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=70"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/doka2000gt.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}