{"id":1127,"date":"2022-01-19T08:47:00","date_gmt":"2022-01-18T23:47:00","guid":{"rendered":"https:\/\/blog.wsd.sh\/?p=1127"},"modified":"2022-01-19T09:07:45","modified_gmt":"2022-01-19T00:07:45","slug":"golang-%e7%b5%84%e3%81%bf%e8%be%bc%e3%81%bf%e6%a9%9f%e8%83%bddelete%e3%81%a7%e3%81%af%e6%88%bb%e3%82%8a%e5%80%a4%e3%81%8c%e3%81%aa%e3%81%84%e3%81%ae%e3%81%a7%e3%80%81%e6%88%bb%e3%82%8a%e5%80%a4","status":"publish","type":"post","link":"https:\/\/blog.wsd.sh\/?p=1127","title":{"rendered":"<small>Golang \u7d44\u307f\u8fbc\u307f\u6a5f\u80fdDelete\u306b\u3001\u623b\u308a\u5024\u3092\u4ed8\u3051\u305f\u95a2\u6570<\/small>"},"content":{"rendered":"<p>\uff11\uff0e\u7d44\u307f\u8fbc\u307f\u6a5f\u80fdDelete\u3067\u306f\u623b\u308a\u5024\u304c\u306a\u3044\u306e\u3067\u3001\u6587\u5b57\u9650\u5b9a\u306e\u623b\u308a\u5024\u306e\u3042\u308bDeleteMap_string\u3092\u4f5c\u6210<\/p>\n<p>\uff12\uff0ecode<\/p>\n<pre>\r\nfunc DeleteMap_string(s *map[string]interface {}, e string ) bool {\r\n\r\n\/\/ MAP\u306b\u8a72\u5f53\u306ekey\u304c\u6709\u308b\u304b\u3069\u3046\u304b\u306e\u78ba\u8a8d\r\n  for k, _ := range *s {\r\n      if k == e {\r\n          delete ( *s, e);\r\n          return true;\r\n      }\r\n   }\r\n   return false\r\n}\r\n<\/pre>\n<p>\uff13\uff0e\u4f7f\u7528<br \/>\n\u30fbMap\u306e\u6587\u5b57\u5217\u3092Unmarshal\u3057\u305f\u3082\u306e\u3092\u53d7\u3051\u3063\u3066\u3001Map\u306ekey\u3068\u4e00\u81f4\u3059\u308b\u8981\u7d20\u3092\u524a\u9664\u3059\u308b<br \/>\n\u30fb_bank_contacts\u306f\u3001Map\u306e\u6587\u5b57\u5217<\/p>\n<pre>\r\n        var bank_contacts map[string]interface {}\r\n        json.Unmarshal([]byte(_bank_contacts), &bank_contacts);\r\n\r\n        boolean = usrlib.DeleteMap_string(&bank_contacts, email);\r\n        if boolean == false {\r\n                return;\r\n        }\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\uff0e\u7d44\u307f\u8fbc\u307f\u6a5f\u80fdDelete\u3067\u306f\u623b\u308a\u5024\u304c\u306a\u3044\u306e\u3067\u3001\u6587\u5b57\u9650\u5b9a\u306e\u623b\u308a\u5024\u306e\u3042\u308bDeleteMap_string\u3092\u4f5c\u6210 \uff12\uff0ecode func DeleteMap_string(s *map[string]interface {&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/1127"}],"collection":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1127"}],"version-history":[{"count":4,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/1127\/revisions"}],"predecessor-version":[{"id":1173,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/1127\/revisions\/1173"}],"wp:attachment":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}