{"author_name":"ryuichi1208","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fryuichi1208.hateblo.jp%2Fentry%2F2020%2F03%2F14%2F225111\" title=\"go \u30b7\u30b0\u30ca\u30eb\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0 - \u5730\u65b9\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u5b66\u7fd2\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_url":"https://blog.hatena.ne.jp/ryuichi1208/","version":"1.0","categories":[],"provider_url":"https://hatena.blog","title":"go \u30b7\u30b0\u30ca\u30eb\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0","url":"https://ryuichi1208.hateblo.jp/entry/2020/03/14/225111","type":"rich","height":"190","provider_name":"Hatena Blog","description":"golang\u3067cli\u30c4\u30fc\u30eb\u3092\u66f8\u304f\u969b\u306bsigint\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3059\u308b\u969b\u306e\u65b9\u6cd5 os/signal\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u5bb9\u6613\u306b\u30b7\u30b0\u30ca\u30eb\u306e\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u306e\u3053\u3068\u3002 qiita.com \u4e0a\u8a18\u306e\u8a18\u4e8b\u5185\u3067\u306fSIGINT\u306b\u3064\u3044\u3066\u306e\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u65b9\u6cd5\u304c\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\u3002 \u4e0a\u8a18\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3068channel\u3092\u4f7f\u7528\u3059\u308b\u3002 package main import ( \"os\" \"os/signal\" \"fmt\" \"syscall\" ) func main() { sigCh := make(chan os.Signal, 1) signal.Notify(sigCh, syscall.SIGTERM\u2026","image_url":null,"published":"2020-03-14 22:51:11","width":"100%","blog_url":"https://ryuichi1208.hateblo.jp/","blog_title":"\u5730\u65b9\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u5b66\u7fd2\u65e5\u8a18"}