{"provider_name":"Hatena Blog","url":"https://otiai10.hatenablog.com/entry/2014/06/20/101155","published":"2014-06-20 10:11:55","author_name":"otiai10","author_url":"https://blog.hatena.ne.jp/otiai10/","version":"1.0","height":"190","width":"100%","blog_title":"DRY\u306a\u5099\u5fd8\u9332","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fotiai10.hatenablog.com%2Fentry%2F2014%2F06%2F20%2F101155\" title=\"\u3010invalid array bound n \u3011Go\u8a00\u8a9e\u3067\u914d\u5217\u9577\u3092\u5909\u6570\u3067\u6e21\u3059 - DRY\u306a\u5099\u5fd8\u9332\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u554f\u984c length := len(users) var names [length]string \u3068\u304b\u3057\u305f\u3044\u3051\u3069 invalid array bound length \u3068\u53f1\u3089\u308c\u308b \u89e3\u6c7a \u914d\u5217\u306b\u306fconstant\u3057\u304b\u6e21\u305b\u306a\u3044\u3002\u53ef\u5909\u9577\u914d\u5217\u306b\u306f\u30b9\u30e9\u30a4\u30b9\u3092\u4f7f\u3046 Google \u30b0\u30eb\u30fc\u30d7 Go\u8a00\u8a9e\u306e\u30b9\u30e9\u30a4\u30b9\u3092\u7406\u89e3\u3057\u3088\u3046 length := len(users) names := make([]string, length) \u306a\u3044\u3057\u3001\u5358\u306b var names []string for _, user := range users { names = append(names, user.Name()) } \u2026","categories":["go"],"title":"\u3010invalid array bound n \u3011Go\u8a00\u8a9e\u3067\u914d\u5217\u9577\u3092\u5909\u6570\u3067\u6e21\u3059","image_url":null,"blog_url":"https://otiai10.hatenablog.com/","type":"rich","provider_url":"https://hatena.blog"}