{"provider_url":"https://hatena.blog","blog_title":"yyzzz\u2019s diary","provider_name":"Hatena Blog","categories":[],"image_url":null,"title":"golang\u3067\u8a70\u307e\u3063\u305f\u70b9: todo redeclared in this block (compile)","author_name":"yyzzz","description":"# golang\u3067\u8a70\u307e\u3063\u305f\u70b9 golang\u306e\u8fd4\u308a\u5024\u306e\u66f8\u304d\u65b9\u306b\u306f2\u7a2e\u985e\u3042\u308b\u3002 \u4e00\u3064\u76ee\u306f\u8fd4\u308a\u5024\u306e\u65b9\u306e\u307f\u6307\u5b9a\u3059\u308b\u30d1\u30bf\u30fc\u30f3 func GetTodo(id int) (Todo, error) {} \u4e8c\u3064\u76ee\u306f\u540c\u6642\u306b\u5ba3\u8a00\u3059\u308b\u5834\u5408\u30d1\u30bf\u30fc\u30f3 func GetTodo(id int) (todo Todo, err error) {} \u4e8c\u3064\u76ee\u306e\u30d1\u30bf\u30fc\u30f3\u3067\u5ba3\u8a00\u3057\u3066\u3044\u308b\u3068\u3001\u95a2\u6570\u5185\u3067\u540c\u3058\u540d\u524d\u3067\u5ba3\u8a00\u3057\u305f\u5834\u5408\u306b\u6307\u6458\u304c\u5165\u308b\u3002 \u6b63: func GetTodo(id int) (todo Todo, err error) { Db.Find(&todo, id) return todo, err } \u8aa4: func GetT\u2026","published":"2023-04-12 07:17:06","width":"100%","height":"190","version":"1.0","author_url":"https://blog.hatena.ne.jp/yyzzz/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyyzzz.hatenadiary.com%2Fentry%2F2023%2F04%2F12%2F071706\" title=\"golang\u3067\u8a70\u307e\u3063\u305f\u70b9: todo redeclared in this block (compile) - yyzzz\u2019s diary\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://yyzzz.hatenadiary.com/","type":"rich","url":"https://yyzzz.hatenadiary.com/entry/2023/04/12/071706"}