{"description":"\u30bf\u30a4\u30c8\u30eb\u306e\u901a\u308a\u3067\u3059\u3002 \u4ee5\u4e0b\u306e\u3088\u3046\u306bint\u578b\u306eFooType\u3068BarType\u3092\u5ba3\u8a00\u3057\u3066\u3001\u305d\u308c\u305e\u308c60\u3092enum\u3067\u6301\u3064\u5024\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u307e\u3059 package main import \"fmt\" type FooType int type BarType int const ( Hoge FooType = 60 Nyan FooType = 61 Baz BarType = 60 ) var someTypes = []interface{}{ Hoge, Baz, } func main() { for _, t := range someTypes { if t == Baz { fmt.Pr\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanatofuz.hatenablog.com%2Fentry%2F2023%2F06%2F13%2F212552\" title=\"golang\u306eenum\u306f\u578b\u304c\u9055\u3046\u3068\u9055\u3046\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u308b - Acme::AnaTofuZ-&gt;new;\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","title":"golang\u306eenum\u306f\u578b\u304c\u9055\u3046\u3068\u9055\u3046\u3082\u306e\u3068\u3057\u3066\u6271\u308f\u308c\u308b","blog_title":"Acme::AnaTofuZ->new;","width":"100%","categories":["golang"],"version":"1.0","published":"2023-06-13 21:25:52","blog_url":"https://anatofuz.hatenablog.com/","url":"https://anatofuz.hatenablog.com/entry/2023/06/13/212552","author_name":"anatofuz","provider_name":"Hatena Blog","image_url":null,"height":"190","author_url":"https://blog.hatena.ne.jp/anatofuz/","provider_url":"https://hatena.blog"}