{"id":169755,"date":"2020-10-17T05:02:53","date_gmt":"2020-10-16T21:02:53","guid":{"rendered":"http:\/\/4563.org\/?p=169755"},"modified":"2020-10-17T05:02:53","modified_gmt":"2020-10-16T21:02:53","slug":"%e4%b8%80%e4%b8%aa-go-%e9%97%ae%e9%a2%98%e8%af%b7%e6%95%99","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=169755","title":{"rendered":"\u4e00\u4e2a go \u95ee\u9898\u8bf7\u6559"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e00\u4e2a go \u95ee\u9898\u8bf7\u6559               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : momowei <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>func (srv *sysCommonSrv) ListCommongImg() []model.CommonImg {  var imgList []model.CommonImg  err := Db.Find(&amp;imgList).Error  if nil != err {   return make([]model.CommonImg, 0)  }  i := 0  for ; i &lt; len(imgList); i++ {   img1 := imgList[i]   fmt.Printf(\"%pn\", &amp;img1)    if img1.Type2 == 1 {    imgList[i].Imgpath = CacheFactory.Create().GetSysConfgiByCode(\"sysconfig_local_imgserver\") + \"\/\" + img1.Imgpath   }   fmt.Printf(\"%pn\", &amp;imgList[i])  }  return imgList } <\/code><\/pre>\n<p>\u8f93\u51fa<\/p>\n<pre><code>0xc0003f18b0 0xc0003f1860 <\/code><\/pre>\n<p>\u6211\u8fd9\u91cc\u7528\u7684\u4e0d\u662f range \u904d\u5386\uff0c img1 := imgList[i] \u8fd9\u4e5f\u662f\u503c\u62f7\u8d1d\u5417? \u4e3a\u5565\u8f93\u51fa\u7684\u6307\u9488\u5730\u5740\u4e0d\u4e00\u6837\u5440<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3831539\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ArJun <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             img1 := \u662f\u91cd\u65b0\u521b\u5efa\u503c\uff0cimgList[i]\u8fd9\u4e2a\u662f\u4fee\u6539\uff0c \u4f60\u7528 imgList[i] = \u5c31\u53ef\u4ee5\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831540\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JeromeCui <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u7684\uff0c\u503c\u62f7\u8d1d\u3002<br \/>var imgList []model.CommonImg \u8fd9\u4e2a\u5730\u65b9\u53ef\u4ee5\u6539\u6210 var imgList []*model.CommonImg\uff0c\u4e4b\u540e\u6bcf\u4e2a\u5143\u7d20\u5c31\u662f\u4e00\u4e2a\u6307\u9488\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831541\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lcc142625 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bf9\u7684\uff0c\u4e0a\u7684\u610f\u601d\uff0c\u4f60\u5f97\u6539\u6210 var imgList []*model.CommonImg\uff0c\u4e0d\u7136\u4f60\u7684\u540e\u9762 img1 := \u662f\u91cd\u65b0\u8d4b\u503c\uff0c\u5730\u5740\u5f53\u7136\u4e0d\u4e00\u6837\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831542\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tutuk5 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8fd9\u4e2a\u662f\u503c\u7c7b\u578b\uff0c\u503c\u7c7b\u578b\u90fd\u662f\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5185\u5b58\uff0c\u53ea\u6709\u5f15\u7528\u7c7b\u578b\u624d\u662f\u521b\u5efa\u4e00\u4e2a\u6307\u9488\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831543\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qysz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             img1 \u5b9a\u4e49\u5728 for \u5faa\u73af\u5916\u9762\u8bd5\u8bd5\uff0c\u5faa\u73af\u5185\u4e0d\u8981\u7528 := \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831544\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : momowei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @JeromeCui \u6211\u4ee5\u4e3a\u53ea\u6709 range \u624d\u662f\u503c\u62f7\u8d1d\u5217\uff0c\u8fd9\u4e2a\u8bed\u4e49\u8ddf java \u8fd8\u662f\u86ee\u5927\u533a\u522b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831545\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0xWalker <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             img1 \u662f\u4e34\u65f6\u53d8\u91cf\u7684\u5730\u5740                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831546\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : di1012 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             img1 := imgList[i]<br \/>\u7b49\u4ef7\u4e8e<br \/>var img1 model.CommonImg<br \/>img1=imgList[i]<\/p>\n<p>&amp;img1 \u53d6\u7684\u662f\u65b0\u521b\u5efa\u7684\u53d8\u91cf\u7684\u5730\u5740                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831547\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mcfog <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e0d\u540c\u4e8e\u5176\u4ed6\u8bed\u8a00\uff0cgolang \u6c38\u8fdc\u90fd\u662f\u503c\u62f7\u8d1d\uff0c\u503c\u4f20\u53c2\uff0c\u6ca1\u6709\u4f8b\u5916\u3002\u6307\u9488\u662f\u5355\u7eaf\u7684\uff08\u503c\uff09\u7c7b\u578b\uff0c\u201c\u5f15\u7528\u201d\u53ea\u662f\u201c\u89e3\u6307\u9488\u201d\u52a8\u4f5c\u7684\u6548\u679c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3831548\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sunny352787 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8bb0\u4f4f go \u91cc\u9762\u6240\u6709\u4e1c\u897f\u90fd\u662f\u503c\uff0c\u60f3\u6539\u7528\u6307\u9488                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2a go \u95ee\u9898\u8bf7\u6559 \u8cc7\u6df1\u5927\u4f6c :&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/169755"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=169755"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/169755\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=169755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=169755"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=169755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}