锘??xml version="1.0" encoding="utf-8" standalone="yes"?>夜夜嗨网站十八久久,欧美午夜剧场,老司机精品导航http://www.shnenglu.com/sunicdavy/category/21050.html璁ㄨ緹?309800774 鐭ヤ箮鍏蟲敞:http://zhihu.com/people/sunicdavy 寮婧愰」鐩?https://github.com/davyxuzh-cnMon, 27 Dec 2021 16:46:30 GMTMon, 27 Dec 2021 16:46:30 GMT60浣嗘槸GPU鐨勬ц兘渚濈劧榪樻槸DrawCall浼樺寲閭d竴濂?/title><link>http://www.shnenglu.com/sunicdavy/archive/2021/12/27/217892.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Mon, 27 Dec 2021 11:01:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2021/12/27/217892.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/217892.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2021/12/27/217892.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/217892.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/217892.html</trackback:ping><description><![CDATA[ Entitas鐨凟CS緋葷粺 1. 鏈潵鍦ㄤ竴涓璞′腑娣誨姞涓涓被瀛楁鐨勮繃紼嬶紝ECS闇瑕佹坊鍔犱竴涓被浠h〃Component錛屽茍涓斾唬鐮佺敓鎴愩? 榪欎釜瀛楁涓鑸敤浜庢弿榪板璞$殑璧勬簮錛屽鐞嗘樉紺虹殑GameObject錛?琛ㄧず瀵硅薄鐨勭被鍨嬬瓑銆? 2. 鏈潵涓涓璞$殑涓氬姟閫昏緫澶勭悊榪囩▼鐩存帴鐢ㄦ柟娉曡В鍐崇殑錛?ECS闇瑕佹柊鍔犱竴涓猄ystem錛岃屾搷浣滃璞¢渶瑕佷嬌鐢‵ilter鎴朑roup鏌ヨ鑾峰緱銆? 3. 涓緋誨垪鐨勬搷浣滐紝 闇瑕佹媶鍒嗕負澶氫釜System鍜孋omponent鎷嗗垎澶勭悊銆傚鏋淪ystem欏哄簭涓嶅錛?浼氶犳垚涓浜涜寮傜殑bug銆? 4. Component涓嶄粎浠呮槸Model鎵胯澆浣擄紝 涔熷彲浠ユ槸鍙傛暟鐨勬暟鎹粨鏋勩傚弬鏁癈omponent閫氳繃Entity浼犻掑埌System澶勭悊銆?渚嬪錛?閫氳繃ECS鍒涘緩涓涓柟鍧楃殑榪囩▼錛屼嬌鐢–reateTileComponent錛屽寘鍚垱寤篢ile鐨勪綅緗紝 鍒涘緩Entity騫舵坊鍔燙reateTileComponent錛?鍦–reateTileSystem涓鐞嗗氨鍒涘緩浜員ile錛屽鐞嗗畬鎴愭椂錛?闇瑕佸皢浼犲叆鐨凟ntity.Destroy鎺夈? 6. Entity涓婁慨鏀笴omponent鐨勮繃紼嬶紝 浼氳Е鍙戜簨浠躲備慨鏀圭殑榪囩▼闇瑕佷嬌鐢≧elaceXXX錛孹XX琛ㄧず緇勪歡鍚嶃傜粍浠跺彲浠ラ綣佷慨鏀癸紝 涓嶇敤鎷呭績娣誨姞鍜屽垹闄ょ粍浠惰繃紼嬬殑鎬ц兘錛?Entitas搴曞眰澶勭悊鎬ц兘鍙浉褰撲簬鎸囬拡璧嬪肩殑鎬ц兘銆? ECS鍍忎粈涔堬紵 1. ECS涓殑System綾諱技瑙﹀彂鍣ㄧ郴緇燂紙Event-Condition-Action錛夛紝鍏朵腑錛孍vent瀵瑰簲Entitas鐨凣etTrigger+Collector錛岃〃紺鴻Е鍙戜簨浠躲侰ondition瀵瑰簲Filter琛ㄧず鍦ㄤ簨浠舵潵婧愬璞′腑鎵懼埌闇瑕佺殑瀵硅薄銆?Action瀵瑰簲Execute錛岃〃紺哄疄闄呯殑鎿嶄綔銆? 2. ECS涓殑Component綾諱技涓嶇敤lua鎵╁睍鐨凴edis鎴栬呬笉鐢ㄥ瓨鍌ㄨ繃紼嬬殑MySQL錛?綰補綰暟鎹紝 鑰屼笉鑳藉鏁版嵁鏈変換浣曞皝瑁呮搷浣溿傛病鏈塴ua鍜屽瓨鍌ㄨ繃紼嬫敮鎸佺殑db鍐欒搗鏉ヨ繕鏄瘮杈冭垂鍔茬殑錛屼絾ECS灝辨槸閭d箞鐨勭函銆? 3. ECS涓殑Entity寰堝按灝紝鍥犱負Component鏄寜綾誨埆榪炵畫瀛樺偍鐨勪互淇濊瘉鎬ц兘銆?閫昏緫鍙堥渶瑕丒ntity緇勫悎鎴愰昏緫闇瑕佺殑澶嶅悎瀵硅薄銆?涓よ竟閮借鐓ч【錛屾墍浠ヨ繖縐嶈璁″氨璁╀唬鐮侀噺宸ㄥ錛屽彲璇繪т笅闄嶃? ECS浼佸浘鐢ㄤ竴濂楁鏋剁伃鎺夎璁℃ā寮? 1. 鍗曚歡錛圫ingleton錛夊湪Entitas鐢║nique鏍囩鏍囪Component錛?鍦–ontext涓氨鏄敮涓鐨勶紝 鍏跺疄涔熷氨鏄疭ingleton銆? 2. ECS騫叉帀浜嗕紶緇熺殑宸ュ巶妯″紡錛屽簳灞傜粺涓瀵瑰璞★紙Entity錛夊拰灞炴э紙Component錛夌粺涓綆$悊銆傞渶瑕佹寜Component涓殑鍊兼壘鍥濫ntity鏃訛紝 鍙互浣跨敤EntityIndex銆? 3. Entity鎼哄甫涓嶅悓鐨勭粍浠舵椂錛屾暣涓垱寤哄拰閿姣佽繃紼嬭璁板綍騫舵仮澶嶏紝鍏跺疄灝辨槸Command妯″紡 ECS閫傚悎鍋歎I妗嗘灦錛堢被浼糓VVM錛孧VC,MVP錛変箞錛? ECS涓嶆槸涓撶敤鐨刄I妗嗘灦錛屼絾鏄彲浠ュ涓嶅悓緋葷粺鍜屾暟鎹棿瑙h︺備紶緇熶唬鐮佷腑鏁版嵁淇敼鍚庣殑Callback錛孍CS涔熷彲浠ョ敤Listener鍋氾紝 浣哃istener鍥犱負鑳戒繚瀛樻暟鎹紝 灝遍渶瑕佺敤Component淇濆瓨銆?鎵浠ヤ綘闇瑕侀潰瀵圭殑鏄紝涓涓狟utton錛屽搷搴斿垱寤轟竴涓弬鏁扮敤鐨凜omponent鍜孲ystem錛岃繕瑕佷負鏁版嵁鏀瑰彉鍐欎竴濂桳istenComponent鍜孡istener澶勭悊鐨凷ystem錛岄吀鐖藉惂錛? Minecraft閫傚悎ECS鏉ュ仛涔堬紵 鍙互錛屾ц兘搴旇鑳芥彁鍗囦笉灝戯紝浣嗘槸浠g爜浼氭洿綣佺悙錛岀壒鍒儚Java榪欑鍟板棪璇█閰嶄笂ECS榪欑鍟板棪妗嗘灦錛屼及璁′唬鐮侀噺緲葷炕榪樻槸寰堣交鏉劇殑銆侻C灞炰簬鐗規畩綾誨瀷鐨勬父鎴忥紝閫傚悎鐗規畩棰嗗煙鐗瑰埆浼樺寲錛屼篃灝辨槸涓撻棬涓烘柟鍧楀仛鍑虹壒鍒殑璁捐鏉ュ仛浼樺寲銆侲CS灞炰簬閫氱敤妗嗘灦錛屽嵆渚挎ц兘OK錛屼絾鏄唬鐮佹湭蹇呰兘鏈夎壇濂界殑鍙鎬с? 浣撻噺灝忕殑娓告垙閫傚悎鐢‥CS鏉ュ仛涔堬紵 鍙互錛屼絾涓嶅緩璁傜壒鍒槸鍙湁鍑犱釜浜虹淮鎶ょ殑宸ョ▼錛岃錘鐒朵笂ECS緋葷粺錛屼細璁╃郴緇熷彉鐨勬瀬涓哄鏉傘傚綋鐒朵綘浼氳錛屽鏋滃紑鍙戝埌鍚庢湡錛屼紶緇熷紑鍙戞ā寮忎細瀵艱嚧浠g爜浼氫貢錛孍CS浼氬ソ浜涘惂銆傛帉鎻CS涔熶笉鏄竴澶╀袱澶╃殑浜嬫儏錛屼笉鐔熸倝ECS鐨勭▼搴忓憳璁捐鍑烘潵鐨勭郴緇熻幏寰楃殑浼樺娍鍙兘榪樹笉濡傜敤浼犵粺璁捐鏂規硶濂藉憿銆? 鏋舵瀯瑙e喅鐨勬槸浜虹殑闂錛?浜洪兘鏈夐棶棰橈紝鐢ㄤ粈涔堟鏋墮兘娌″姙娉曘? 鍒板簳浠涔堥」鐩傚悎鐢‥CS錛? 1. 澶ч噺鐨勫皬涓綋涓嶆柇鐨勭敓鎴愬拰閿姣佷互鍙婃樉紺猴紝渚嬪錛?鏀誨煄鎴樹腑錛岃浣撶幇姣忎釜瑙掕壊鐨勭Щ鍔紝鎴樻枟銆? 2. 澶氫簬5涓漢緙栧啓鏍稿績鎴樻枟閫昏緫銆備簰鐩稿崗浣滃拰妯″潡鍒囧垎錛岄渶瑕佷竴涓ぇ瀹墮兘鑳戒俊鏈嶇殑妗嗘灦錛孍CS鍙互閫夋嫨銆? P.S. 涓嶈閫燛CS鐨勮疆瀛愶紒 寰堝鍚屽鐪嬩簡ECS鍩烘湰鍘熺悊錛屽湪娌℃湁娣卞叆浣跨敤榪囦換浣旹CS緋葷粺鏃墮┈涓婃搷鍒閫犺疆瀛愩侲CS緋葷粺紜疄鐪嬭搗鏉ョ畝鍗曘傚疄闄呴犱笅鏉ヤ綘浼氬彂鐜幫紝鎬ц兘闈炲父緋熺硶浠ュ強涓嶇煡閬撲竴浜涢昏緫濡備綍鐢‥CS鏉ヨВ鍐熾? 鎬葷粨錛? 1. ECS紜疄涓烘ц兘鑰岀敓錛屾病鏈夊茍鍙戝姞鎸佹ц兘鐨凟CS閮芥槸鑰嶆祦姘擄紝瑕佸揩灝辮蹇埌鏋佽嚧銆? 2. Unity涓紝ECS騫跺彂鑳芥墿灞旵PU鐨勫埄鐢ㄧ巼錛屼絾鏄疓PU鐨勬ц兘渚濈劧榪樻槸DrawCall浼樺寲閭d竴濂楋紝鍒湡鏈汦CS浼氶瑕哢nity錛屾ц兘涔熶笉浼氬揩鍒伴璧鳳紝鍏抽敭榪樻槸瑕佺湅鍏蜂綋鐨勯」鐩拰浜恒? 3. ECS鏄竾鑳芥鏋訛紝浣嗕笉鍏ㄨ兘銆備紶緇熸灦鏋勫拰璁捐鎬濇兂涔熶笉鏄竴鏃犳槸澶勶紝鐔熷暐鐢ㄥ暐錛屾庝箞蹇庝箞鏉ワ紒 https://mip.bmlink.com/wu19870821/news/2611408.html https://mip.bmlink.com/wu19870821/news/2611409.html https://mip.bmlink.com/wu19870821/news/2611410.html https://mip.bmlink.com/wu19870821/news/2611411.html https://mip.bmlink.com/wu19870821/news/2611412.html https://mip.bmlink.com/wu19870821/news/2611413.html https://mip.bmlink.com/wu19870821/news/2611414.html https://mip.bmlink.com/wu19870821/news/2611415.html https://mip.bmlink.com/wu19870821/news/2611416.html https://mip.bmlink.com/wu19870821/news/2611417.html https://m.bmlink.com/wu19870821/news/2611408.html https://m.bmlink.com/wu19870821/news/2611409.html https://m.bmlink.com/wu19870821/news/2611410.html https://m.bmlink.com/wu19870821/news/2611411.html https://m.bmlink.com/wu19870821/news/2611412.html https://m.bmlink.com/wu19870821/news/2611413.html https://m.bmlink.com/wu19870821/news/2611414.html https://m.bmlink.com/wu19870821/news/2611415.html https://m.bmlink.com/wu19870821/news/2611416.html https://m.bmlink.com/wu19870821/news/2611417.html https://wu19870821.bmlink.com/news/2611408.html https://wu19870821.bmlink.com/news/2611409.html https://wu19870821.bmlink.com/news/2611410.html https://wu19870821.bmlink.com/news/2611411.html https://wu19870821.bmlink.com/news/2611412.html https://wu19870821.bmlink.com/news/2611413.html https://wu19870821.bmlink.com/news/2611414.html https://wu19870821.bmlink.com/news/2611415.html https://wu19870821.bmlink.com/news/2611416.html https://wu19870821.bmlink.com/news/2611417.html https://www.bmlink.com/wu19870821/news/2611408.html https://www.bmlink.com/wu19870821/news/2611409.html https://www.bmlink.com/wu19870821/news/2611410.html https://www.bmlink.com/wu19870821/news/2611411.html https://www.bmlink.com/wu19870821/news/2611412.html https://www.bmlink.com/wu19870821/news/2611413.html https://www.bmlink.com/wu19870821/news/2611414.html https://www.bmlink.com/wu19870821/news/2611415.html https://www.bmlink.com/wu19870821/news/2611416.html https://www.bmlink.com/wu19870821/news/2611417.html https://mip.bmlink.com/chaoweifensuiji/news/2611407.html https://mip.bmlink.com/chaoweifensuiji/news/2611406.html https://mip.bmlink.com/chaoweifensuiji/news/2558756.html https://mip.bmlink.com/chaoweifensuiji/news/2558753.html https://mip.bmlink.com/chaoweifensuiji/news/2558748.html https://mip.bmlink.com/chaoweifensuiji/news/2558743.html https://mip.bmlink.com/chaoweifensuiji/news/2558740.html https://mip.bmlink.com/chaoweifensuiji/news/2558737.html https://mip.bmlink.com/chaoweifensuiji/news/2558731.html https://m.bmlink.com/chaoweifensuiji/news/2611407.html https://m.bmlink.com/chaoweifensuiji/news/2611406.html https://m.bmlink.com/chaoweifensuiji/news/2558756.html https://m.bmlink.com/chaoweifensuiji/news/2558753.html https://m.bmlink.com/chaoweifensuiji/news/2558748.html https://m.bmlink.com/chaoweifensuiji/news/2558743.html https://m.bmlink.com/chaoweifensuiji/news/2558740.html https://m.bmlink.com/chaoweifensuiji/news/2558737.html https://m.bmlink.com/chaoweifensuiji/news/2558731.html https://chaoweifensuiji.bmlink.com/news/2611407.html https://chaoweifensuiji.bmlink.com/news/2611406.html https://chaoweifensuiji.bmlink.com/news/2558756.html https://chaoweifensuiji.bmlink.com/news/2558753.html https://chaoweifensuiji.bmlink.com/news/2558748.html https://chaoweifensuiji.bmlink.com/news/2558743.html https://chaoweifensuiji.bmlink.com/news/2558740.html https://chaoweifensuiji.bmlink.com/news/2558737.html https://chaoweifensuiji.bmlink.com/news/2558731.html https://www.bmlink.com/chaoweifensuiji/news/2611407.html https://www.bmlink.com/chaoweifensuiji/news/2611406.html https://www.bmlink.com/chaoweifensuiji/news/2558756.html https://www.bmlink.com/chaoweifensuiji/news/2558753.html https://www.bmlink.com/chaoweifensuiji/news/2558748.html https://www.bmlink.com/chaoweifensuiji/news/2558743.html https://www.bmlink.com/chaoweifensuiji/news/2558740.html https://www.bmlink.com/chaoweifensuiji/news/2558737.html https://www.bmlink.com/chaoweifensuiji/news/2558731.html https://mip.bmlink.com/towercrane/news/2541940.html https://mip.bmlink.com/towercrane/news/2541945.html https://mip.bmlink.com/towercrane/news/2541950.html https://mip.bmlink.com/towercrane/news/2541966.html https://mip.bmlink.com/towercrane/news/2541991.html https://mip.bmlink.com/towercrane/news/2541992.html https://mip.bmlink.com/towercrane/news/2541993.html https://mip.bmlink.com/towercrane/news/2541994.html https://mip.bmlink.com/towercrane/news/2541995.html https://m.bmlink.com/towercrane/news/2541940.html https://m.bmlink.com/towercrane/news/2541945.html https://m.bmlink.com/towercrane/news/2541950.html https://m.bmlink.com/towercrane/news/2541966.html https://m.bmlink.com/towercrane/news/2541991.html https://m.bmlink.com/towercrane/news/2541992.html https://m.bmlink.com/towercrane/news/2541993.html https://m.bmlink.com/towercrane/news/2541994.html https://m.bmlink.com/towercrane/news/2541995.html https://towercrane.bmlink.com/news/2541940.html https://towercrane.bmlink.com/news/2541945.html https://towercrane.bmlink.com/news/2541950.html https://towercrane.bmlink.com/news/2541966.html https://towercrane.bmlink.com/news/2541991.html https://towercrane.bmlink.com/news/2541992.html https://towercrane.bmlink.com/news/2541993.html https://towercrane.bmlink.com/news/2541994.html https://towercrane.bmlink.com/news/2541995.html https://www.bmlink.com/towercrane/news/2541940.html https://www.bmlink.com/towercrane/news/2541945.html https://www.bmlink.com/towercrane/news/2541950.html https://www.bmlink.com/towercrane/news/2541966.html https://www.bmlink.com/towercrane/news/2541991.html https://www.bmlink.com/towercrane/news/2541992.html https://www.bmlink.com/towercrane/news/2541993.html https://www.bmlink.com/towercrane/news/2541994.html https://www.bmlink.com/towercrane/news/2541995.html https://mip.bmlink.com/xxmjhw888/news/2611429.html https://mip.bmlink.com/xxmjhw888/news/2611428.html https://mip.bmlink.com/xxmjhw888/news/2611427.html https://mip.bmlink.com/xxmjhw888/news/2611426.html https://mip.bmlink.com/xxmjhw888/news/2611425.html https://mip.bmlink.com/xxmjhw888/news/2611424.html https://mip.bmlink.com/xxmjhw888/news/2611423.html https://mip.bmlink.com/xxmjhw888/news/2611422.html https://mip.bmlink.com/xxmjhw888/news/2611421.html https://mip.bmlink.com/xxmjhw888/news/2611420.html https://mip.bmlink.com/xxmjhw888/news/2611419.html https://mip.bmlink.com/xxmjhw888/news/2611418.html https://m.bmlink.com/xxmjhw888/news/2611429.html https://m.bmlink.com/xxmjhw888/news/2611428.html https://m.bmlink.com/xxmjhw888/news/2611427.html https://m.bmlink.com/xxmjhw888/news/2611426.html https://m.bmlink.com/xxmjhw888/news/2611425.html https://m.bmlink.com/xxmjhw888/news/2611424.html https://m.bmlink.com/xxmjhw888/news/2611423.html https://m.bmlink.com/xxmjhw888/news/2611422.html https://m.bmlink.com/xxmjhw888/news/2611421.html https://m.bmlink.com/xxmjhw888/news/2611420.html https://m.bmlink.com/xxmjhw888/news/2611419.html https://m.bmlink.com/xxmjhw888/news/2611418.html https://xxmjhw888.bmlink.com/news/2611429.html https://xxmjhw888.bmlink.com/news/2611428.html https://xxmjhw888.bmlink.com/news/2611427.html https://xxmjhw888.bmlink.com/news/2611426.html https://xxmjhw888.bmlink.com/news/2611425.html https://xxmjhw888.bmlink.com/news/2611424.html https://xxmjhw888.bmlink.com/news/2611423.html https://xxmjhw888.bmlink.com/news/2611422.html https://xxmjhw888.bmlink.com/news/2611421.html https://xxmjhw888.bmlink.com/news/2611420.html https://xxmjhw888.bmlink.com/news/2611419.html https://xxmjhw888.bmlink.com/news/2611418.html https://www.bmlink.com/xxmjhw888/news/2611429.html https://www.bmlink.com/xxmjhw888/news/2611428.html https://www.bmlink.com/xxmjhw888/news/2611427.html https://www.bmlink.com/xxmjhw888/news/2611426.html https://www.bmlink.com/xxmjhw888/news/2611425.html https://www.bmlink.com/xxmjhw888/news/2611424.html https://www.bmlink.com/xxmjhw888/news/2611423.html https://www.bmlink.com/xxmjhw888/news/2611422.html https://www.bmlink.com/xxmjhw888/news/2611421.html https://www.bmlink.com/xxmjhw888/news/2611420.html https://www.bmlink.com/xxmjhw888/news/2611419.html https://www.bmlink.com/xxmjhw888/news/2611418.html https://www.ixueyi.com/qinggan/a_Tl9sM38K.html https://www.ixueyi.com/falv/a_2I2ewPSh.html https://www.ixueyi.com/falv/a_Y1Un4tSK.html https://www.ixueyi.com/falv/a_9Q3N5R3R.html https://www.ixueyi.com/falv/a_A9E8Pvl3.html https://www.ixueyi.com/falv/a_2jy4G07C.html https://www.ixueyi.com/falv/a_W5r2as2P.html https://www.ixueyi.com/falv/a_a20P8p3T.html https://www.ixueyi.com/falv/a_5jl15mkU.html https://www.ixueyi.com/falv/a_C646nFN4.html https://www.ixueyi.com/falv/a_n71xa7a2.html https://www.ixueyi.com/falv/a_VCxaehV6.html https://www.ixueyi.com/falv/a_7JhXF2L0.html https://www.ixueyi.com/falv/a_y5tA5IdR.html https://www.ixueyi.com/falv/a_qn722hR8.html https://www.ixueyi.com/falv/a_yX5W85yK.html https://www.ixueyi.com/renshi/a_r569sY1C.html https://www.ixueyi.com/renshi/a_472EFKfF.html https://www.ixueyi.com/renshi/a_umemPeiO.html https://www.ixueyi.com/renshi/a_9o6T89n3.html https://www.ixueyi.com/renshi/a_GX26np9Q.html https://www.ixueyi.com/falv/a_4CAdyV14.html https://www.ixueyi.com/falv/a_i28019yM.html https://www.ixueyi.com/falv/a_b2fyO1od.html https://www.ixueyi.com/falv/a_oq1MYAeY.html https://www.ixueyi.com/falv/a_XSVSuYNm.html https://www.ixueyi.com/falv/a_LUxNT8oA.html https://www.ixueyi.com/falv/a_agNvlmr3.html<img src ="http://www.shnenglu.com/sunicdavy/aggbug/217892.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2021-12-27 19:01 <a href="http://www.shnenglu.com/sunicdavy/archive/2021/12/27/217892.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>娓告垙涓嶹eb鐨勬湇鍔″櫒瀵規瘮http://www.shnenglu.com/sunicdavy/archive/2018/08/29/215887.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Wed, 29 Aug 2018 03:16:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2018/08/29/215887.htmlhttp://www.shnenglu.com/sunicdavy/comments/215887.htmlhttp://www.shnenglu.com/sunicdavy/archive/2018/08/29/215887.html#Feedback0http://www.shnenglu.com/sunicdavy/comments/commentRss/215887.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/215887.html涓轟簡緙栧啓鍩轟簬cellnet鐨勬柊涓浠f父鎴忔湇鍔″櫒妗嗘灦錛屾渶榪戞繁鍏ョ爺絀跺井鏈嶅姟錛孲erviceMesh絳夋蹇點傜爺絀惰繃紼嬩腑瀵筗eb鍜屾父鎴忎袱縐嶆湇鍔″櫒鏋舵瀯璁捐鏈変竴浜涘績寰楋紝緙栧啓騫惰褰曚笅鏉ャ?涓嬫枃涓紝Game琛ㄧず娓告垙鏈嶅姟鍣紝Web琛ㄧずWeb鏈嶅姟鍣? ``
鐘舵佺紦瀛?/span>
鎵璋撶姸鎬佺紦瀛橈紝灝辨槸鍦ㄥ唴瀛樿岄潪涓撲笟鏁版嵁緙撳瓨鏈嶅姟鍣紙濡俽edis錛変腑淇濆瓨鍜屽鐞嗛昏緫鏁版嵁錛屾墜鍔ㄧ紪鍐欐榪囩▼杈冧負綣佺悙浣嗘槸鏁堢巼杈冮珮錛屼絾闅忕潃鐘舵侀昏緫澶嶆潅鎬у拰騫跺彂銆佹墿瀹歸棶棰樻彁鍑猴紝鐘舵佸悓姝ヤ細鍙樺緱瓚婃潵瓚婂鏉傘?/span>
Game:
寮轟氦浜掓х殑鏈嶅姟鍣ㄧ被鍨嬮渶瑕佸湪鏈嶅姟鍣ㄥ仛緙撳瓨錛岄昏緫緙栧啓涔熻緝涓哄鏄擄紝鏃犻渶澶勭悊浜嬪姟騫跺彂闂銆備緥濡傦細緇勯槦錛屽尮閰嶏紝鎴樻枟閫昏緫銆傛湇鍔″櫒涓嶈兘闅忔剰閲嶅惎銆?/span>
寮變氦浜掓х殑鏈嶅姟鍣ㄧ被鍨嬪彲閰嶅悎redis鍋氭垚鏃犵姸鎬佹湇鍔″櫒錛屼緥濡傦細鍏繪垚錛屾妧鑳藉崌綰э紝棰嗗彇鐗╁搧絳夈傛湇鍔″櫒闅忔椂鏀寔閲嶅惎銆?/span>
娓告垙鏈嶅姟鍣ㄤ負浜嗘彁楂樻ц兘錛屾棭鏈熸墍鏈夋湇鍔″櫒閮芥槸浣跨敤鐘舵佺紦瀛樺啓娉曠紪鍐欙紝鐗瑰埆鏄疢MORPG榪欑被寮轟氦浜掔殑娓告垙鏈嶅姟鍣ㄥ挨涓轟弗閲嶃?/span>
Web:
鍧囦負鏃犵姸鎬佹湇鍔″櫒錛屽急浜や簰銆備嬌鐢ㄤ簨鍔℃柟寮忓鐞嗗茍鍙戦昏緫錛屼緥濡傦細浜ゆ槗錛屼笅鍗曠瓑銆?/span>
鎺ㄩ侊紝鍗曠嫭鍙戦?/span>
榪欓噷鎻愬埌鐨勬墍璋撴帹閫侊紝鍗曠嫭鍙戦佹槸涓嶳PC鍖哄埆鐨勯氳鏂規硶銆俁PC瑕佹眰璇鋒眰蹇呴』鏈夊洖搴斻傝屾帹閫佸崟鐙彂閫佸垯鏇村儚鏄氱煡鍜屽箍鎾紝鏃犻渶鐩殑鏂硅繑鍥炰換浣曟秷鎭?/span>
Game:
鎵懼埌鏈嶅姟鍣ㄧ殑Session錛岀洿鎺end
閫氳繃涓漿鏈嶅姟鍣紝鎴栫О涓轟腑蹇冩湇鍔″櫒榪涜娉ㄥ唽/騫挎挱
瀹㈡埛绔殑model鏁版嵁闇瑕佹洿鏂版椂錛屾湇鍔″櫒浼氫富鍔ㄦ帹閫佹秷鎭?/span>
娓告垙鏈嶅姟鍣ㄦ病鏈変弗鏍肩殑RPC璁捐闇姹傦紝鎺ㄩ佸拰鍗曠嫭鍙戦佽緝Web鏈嶅姟鍣ㄦ洿澶氥傝屼笖娓告垙鏈嶅姟鍣ㄥ浣跨敤闀胯繛鎺ワ紝鎵浠ヤ富鍔ㄦ帹閫佷篃姣擶eb鏈嶅姟鍣ㄦ潵鐨勬柟渚夸竴浜涖?/span>
Web:
灝嗘帹閫佸仛鎴愪笓鏈夌殑鏈嶅姟錛屽茍鍋氭帓闃熷拰騫跺彂澶勭悊銆?/span>
鍙敤鎬?/span>
鍚榪囨父鎴忓仠鏈嶆洿鏂幫紝鏀粯瀹濇湇鍔″櫒鍦ㄥ埛浜岀淮鐮佹椂鍋滄湇浜嗗彲涓瀹氳楠傛儴鍚с俉eb瀵規湇鍔″櫒楂樺彲鐢ㄦц姹傚緢楂橈紝娓告垙铏界劧涔熸敞閲嶆湇鍔″櫒紼沖畾鎬у拰鍙敤鎬э紝浣嗘槸鐢變簬鐗堟湰榪唬鏇存柊棰戠箒錛屽仠鏈嶆洿鏂板弽鑰岃兘鑾峰緱鐜╁鎺ュ彈銆?/span>
Game:
娓告垙瀵瑰彲鐢ㄦц姹備笉楂樸?/span>
娓告垙澶х増鏈洿鏂版椂闇瑕佸仠鏈嶆洿鏂般傛敮鎸佺儹鏇存柊鎶鏈殑鏈嶅姟鍣紙渚嬪Erlang錛孲kynet錛変粎浣跨敤鐑洿鏂頒慨澶峛ug錛屽緢灝戠洿鎺ユ洿鏂版柊鐗堟湰銆?/span>
涓嶆槸鎵鏈夌殑娓告垙鏈嶅姟鍣ㄦ敮鎸佸姩鎬佹坊鍔犳湇鍔″櫒銆?/span>
Web:
鏋侀珮鐨勫彲鐢ㄦэ紝鏈嶅姟涓嶅厑璁稿仠鏈嶆洿鏂幫紝浣跨敤钃濈豢鍙婄伆搴︽柟寮忔洿鏂版湇鍔″櫒銆?/span>
闅忔椂鍙互妯悜鎵╁睍鏈嶅姟鍣紝鎻愰珮鏈嶅姟鍣ㄥ閲忓拰鎵胯澆銆?/span>
榪炴帴鍙婁紶杈?/span>
鍧囦嬌鐢═CP浼犺緭鍗忚錛屾父鎴忔湇鍔″櫒娉ㄩ噸鎬ц兘錛岃嚜鏈夊崗璁強浜岃繘鍒跺崗璁嬌鐢ㄨ緝澶氥?/span>
Web娉ㄩ噸鍏煎鍜屾帴鍙e弸濂斤紝浣跨敤JSON鏍煎紡杈冨銆?/span>
Game:
浣跨敤闀胯繛鎺ワ紝闇瑕佷粠閫昏緫灞傜淮鎶よ繛鎺ョ姸鎬佸強澶勭悊鏈嶅姟鍣ㄤ笉鍦ㄧ嚎鎯呭喌
浣跨敤鑷湁灝佸寘鏍煎紡錛屽ぇ閮ㄥ垎浣跨敤protobuf鎴栦簩榪涘埗嫻佹牸寮忋?/span>
Web:
寰湇鍔″ぇ閮ㄥ垎浣跨敤鐭繛鎺ワ紝grpc鏀寔http2闀胯繛鎺?/span>
浣跨敤json緙栫爜鏂逛究璋冭瘯鍜岀増鏈吋瀹廣?/span>
嫻侀噺闄愬埗
浜烘暟澶氫簡錛屼換浣曟湇鍔″櫒閮芥墰涓嶄綇錛屾祦閲忛檺鍒跺拰鐧誨叆闄愬埗鑳芥湁鏁堜繚鎶ゆ湇鍔″櫒紼沖畾銆?/span>
Game:
鍗曟湇鏈変漢鏁伴檺鍒訛紝鍙互閫氳繃GM鍚庡彴璁劇疆鎸″錛岃秴榪囨棤娉曡繘鍏?/span>
Web:
闄愭祦鍣ㄤ腑闂翠歡錛屽彲浠ョ簿紜埌鏈嶅姟鎺у埗嫻侀噺
鏂祦錛岄槻姝㈤洩宕?/span>
Game:
娓告垙娌℃湁錛屼篃涓嶉渶瑕佽繖縐嶆蹇碉紝娓告垙璇鋒眰涓嶄細紿佺劧鍗囬珮錛屽嵆渚挎湁錛屼篃閫氳繃GM鍚庡彴浜轟負鎺у埗
Web:
鏂祦鍣ㄤ腑闂翠歡
鏈嶅姟鍙戠幇
濡備綍鎵懼埌鏈嶅姟鍣ㄥ湴鍧銆?/span>
鏈嶅姟鏈夊彉鍖栨椂錛岄氳繃Watch緋葷粺閫氱煡璁㈤槄鑰呮洿鏂版湰鍦扮紦瀛?/span>
鏈嶅姟鍣ㄦ病鏈夊彉鍖栨椂錛屼嬌鐢ㄦ湰鍦扮紦瀛樻壘鍒版湇鍔″湴鍧
Game:
娓告垙鏈嶅姟鍣ㄤ簰鐩鎬緷璧栧鐢ㄥ彧鍦ㄥ緢灝忕殑鑼冨洿鍐咃紝鍥犳鏃犻渶鍦ㄤ笉鍚岃璦涓嶅悓榪涚▼鏈嶅姟闂磋幏寰楀湴鍧錛屽ぇ閮ㄥ垎鍦ㄩ厤緗枃浠朵腑濉啓鍚勬湇鍔$殑IP鍙婂湴鍧鍗沖彲浜掔浉璁塊棶銆?/span>
鏃╂湡娓告垙鑷繁緙栧啓鏈嶅姟鍣ㄧ姸鎬佸強鍦板潃鍙戠幇鏈嶅姟銆?/span>
鏈夌敤redis鍋氭湇鍔″彂鐜?/span>
Web:
浣跨敤鏈嶅姟鍙戠幇緋葷粺錛屽垎甯冨紡閮ㄧ講銆傛棤闇渚濊禆閰嶇疆鏂囦歡
緗戝叧闇姹?/span>
Game:
緗戝叧澶勭悊瀹㈡埛绔笂涓嬬嚎閫氱煡錛屽績璺籌紝緇存寔榪炴帴錛岃漿鍙戯紝騫挎挱涓婁笅琛屽皝鍖?/span>
Web:
鏍規嵁璇鋒眰鍦板潃璺敱錛屾棤涓婁笅綰挎蹇碉紝鏃犲績璺熾傚箍鎾氳繃娑堟伅鎺ㄩ佺郴緇熷畬鎴?/span>
鐢變簬絎旇呬粠浜嬫父鎴忚涓氾紝瀵筗eb鏈嶅姟鍣ㄦ蹇靛湪閫愭笎鐔熸倝涓紝鑻ユ湁閿欒鍜屼笉瓚寵鍚勪綅澶т漿鎸囧嚭銆?/span>
鏈漢鏂頒功銆奊o璇█浠庡叆闂ㄥ埌榪涢樁瀹炴垬銆嬶紝鐢熷姩鐨勮璦錛屼緥瀛愬甫鏈夊悇縐嶅僵铔嬶紝杞繪澗浜嗚ВGo璇█鐗規э紝鏇存湁cellnet妗嗘灦鍓栨瀽瑙e瘑
https://search.jd.com/Search?keyword=go%E8%AF%AD%E8%A8%80%E4%BB%8E%E5%85%A5%E9%97%A8%E5%88%B0%E8%BF%9B%E9%98%B6%E5%AE%9E%E6%88%98&enc=utf-8&suggest=1.def.0.V02&wq=Go%E8%AF%AD%E8%A8%80%E4%BB%8E&pvid=145d55a92cab4b07b71326f8beb1700b


鎴橀瓊灝忕瓚 2018-08-29 11:16 鍙戣〃璇勮
]]>
Golang 鐑洿鏂扮爺絀剁瑪璁?/title><link>http://www.shnenglu.com/sunicdavy/archive/2017/07/06/215057.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Thu, 06 Jul 2017 04:47:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2017/07/06/215057.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/215057.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2017/07/06/215057.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/215057.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/215057.html</trackback:ping><description><![CDATA[<p data-source-line="1" style="box-sizing: border-box; margin-bottom: 16px; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 21px; widows: 1; background-color: #ffffff; margin-top: 0px !important;">鏈枃涓昏鐮旂┒娓告垙鏈嶅姟鍣ㄥ甫鐘舵佺殑鐑洿鏂伴渶姹?http鐨勬棤鐘舵佺儹鏇存柊闇姹傚凡緇忔湁鎴愮啛鏂規, 鏁呬笉鍦ㄦ湰鏂囨弿榪拌寖鍥?/p><h1><a href="file:///C:/Users/Davy/AppData/Local/Youdao/YNote/markdown/index.html#鍩烘湰姒傚康" style="box-sizing: border-box; color: #4078c0; text-decoration-line: none;"></a>鍩烘湰姒傚康</h1><ul data-source-line="6" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding-left: 2em; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 21px; widows: 1; background-color: #ffffff;"><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">Golang鐨勭儹鏇存柊閲囩敤浠涔堟満鍒?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">浣跨敤go1.8鎻愪緵鐨刾lugin鍖呮満鍒跺疄鐜?/p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">plugin鍖呮湰韜璁$殑鐩殑鏄儹鏇存柊涔?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">plugin鍖呭叾瀹炲彧鏄敮鎸佸皢浠g爜鍒嗗埆緙栬瘧涓哄涓姩鎬佸簱,鍔ㄦ佸姞杞藉悗榪愯 騫朵笉鑳藉畬鍏ㄦ敮鎸佺被浼糃/C++鐨勫姩鎬佸簱鏂瑰紡澶勭悊浠g爜</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">甯︾姸鎬佺殑榪涚▼鐑洿鏂扮殑鍩烘湰姒傚康鍙婅寖鍥存槸浠涔?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鏁版嵁閮ㄥ垎(model)涓嶆洿鏂? 鍙洿鏂伴昏緫閮ㄥ垎(鍑芥暟)</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">琛ㄦ牸鍜岄厤緗洿鏂扮畻鐑洿鏂頒箞?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">綆? 浣嗕笉鏄湰鏂囨弿榪拌寖鍥?/p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鐑洿鏂拌兘鍦╳indows涓婁嬌鐢ㄤ箞?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">涓嶆敮鎸?/p></li></ul><h1><a href="file:///C:/Users/Davy/AppData/Local/Youdao/YNote/markdown/index.html#浠g爜鍙婄粨鏋? style="box-sizing: border-box; color: #4078c0; text-decoration-line: none;"></a>浠g爜鍙婄粨鏋?/h1><ul data-source-line="29" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; padding-left: 2em; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 21px; widows: 1; background-color: #ffffff;"><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鎴戣兘灝嗗師鏉ヤ竴涓猠xe鐨勪唬鐮佺紪璇戜負so鎻愪緵緇檖lugin浣跨敤涔?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍙互, 浣嗘槸蹇呴』浠嶇劧淇濈暀main鍖呬綔涓烘彃浠跺叆鍙? 騫跺湪main鍖呭唴娣誨姞鎻愪緵緇檖lugin璋冪敤鍏ュ彛.</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">濡傛灉鍔ㄦ佸簱涓病鏈塵ain鍖? 緙栬瘧鍑虹殑so鑳界敤涔?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">涓嶈兘, 鍖呭繀欏誨寘鍚玬ain, 鍚﹀垯杈撳嚭鐨勬槸.a鐨勬枃浠? plugin鍖呭姞杞戒細鎶ラ敊</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍔ㄦ佸簱涓? 闈瀖ain鍖呯殑鐨勪唬鐮佷慨鏀硅兘鍋氱儹鏇存柊涔?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;"><span style="box-sizing: border-box; font-weight: 600;">涓嶈兘</span>!(宕╂簝浜嗗惂, 鎴戞彁浜嗕竴涓猧ssue: <a style="box-sizing: border-box; color: #4078c0; text-decoration-line: none; background-color: transparent;">https://github.com/golang/go/issues/20554</a>)</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">濡傛灉紜疄鍋氫簡淇敼, 搴曞眰浼氭姤閿? plugin was built with a different version of package</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">瑙e喅鏂規硶: 淇敼plugin鍖呭簳灞傚疄鐜板茍閲嶆柊緙栬瘧 鎵撳紑runtime/plugin.go, 娉ㄩ噴浠ヤ笅浠g爜 for _, pkghash := range md.pkghashes { if pkghash.linktimehash != *pkghash.runtimehash { return "", nil, pkghash.modulename } } 鎵ц/usr/local/go/run.bash 閲嶇紪璇?嫻嬭瘯</p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">浠g爜涓摢浜涘彲浠ヨ鏇存柊? 鏂規硶鍙互琚洿鏂頒箞? 闂寘鍛?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍙兘鏇存柊鎷ユ湁闈欐佸湴鍧鐨勭粨鏋?渚嬪: 鍖呯駭鍒嚱鏁?綾諱技浜庨潤鎬佸嚱鏁?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">渚嬪: svc_0.so閲屾湁涓涓狥oo鍑芥暟, svc_1.so淇敼浜咶oo鍑芥暟瀹炵幇, 鐑洿鏂板彲瀹炵幇</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;"><span style="box-sizing: border-box; font-weight: 600;">闂寘=鍑芥暟+鎹曡幏鍙橀噺</span>, 瀹為檯涓婃槸涓涓姩鎬佺粨鏋? 娌℃湁闈欐佸湴鍧, 鏃犳硶琚洿鏂?/p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍚勭鍖呯駭鍒彉閲? 緇撴瀯浣撳彉閲? 緇撴瀯浣撴柟娉? 灞閮ㄥ彉閲忓潎涓嶈兘琚儹鏇存柊, 浣嗘槸鍙橀噺鍊間笉浼氳褰卞搷</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鏂板緇撴瀯鍙互琚繍琛?/p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">浣跨敤緇撴瀯浣撴柟娉曡皟鐢ㄤ簡鍖呯駭鍒嚱鏁? 鍖呯駭鍒嚱鏁拌兘琚洿鏂頒箞?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍙互, 铏界劧鏂規硶涓嶈兘琚洿鏂? 浣嗘柟娉曡璋冪敤鐨勫寘綰у埆鍑芥暟鐨勫湴鍧鏄浐瀹氱殑, 鎵浠ュ彲浠ヨ鐑洿鏂?/p></li><li style="box-sizing: border-box; margin-top: 0.25em;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">init鍖呭垵濮嬪寲鍑芥暟鑳界敤涔? 鑳借鐑洿鏂頒箞?</p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">瀹樻柟榪欐牱鎻忚堪:</p><pre data-source-line="71" style="box-sizing: border-box; font-stretch: normal; font-size: 11.9px; line-height: 1.45; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; word-wrap: normal; margin-top: 0px; margin-bottom: 16px; padding: 16px; overflow: auto; border-radius: 3px; background-color: #f7f7f7;"><code style="box-sizing: border-box; display: inline; overflow: visible; padding: 0px; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; margin: 0px; font-size: 11.9px; border-radius: 3px; word-break: normal; border: 0px; line-height: inherit; word-wrap: normal; background: 0px 0px transparent;"><span style="box-sizing: border-box; font-weight: 700;">When</span> a plugin <span style="box-sizing: border-box; font-weight: 700;">is</span> first opened, the init functions <span style="box-sizing: border-box; font-weight: 700;">of</span> <span style="box-sizing: border-box; font-weight: 700;">all</span> packages <span style="box-sizing: border-box; font-weight: 700;">not</span> already part <span style="box-sizing: border-box; font-weight: 700;">of</span> the program are called. The main <span style="box-sizing: border-box; font-weight: 700;">function</span> <span style="box-sizing: border-box; font-weight: 700;">is</span> <span style="box-sizing: border-box; font-weight: 700;">not</span> run. A plugin <span style="box-sizing: border-box; font-weight: 700;">is</span> only initialized once, <span style="box-sizing: border-box; font-weight: 700;">and</span> cannot be closed</code></pre><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鎻掍歡絎竴嬈¤鎵撳紑鏃? 鍏跺叧鑱旂殑, 娌℃湁鎴愪負紼嬪簭鐨勪竴閮ㄥ垎鐨勬墍鏈夌殑鍖呯殑init鍑芥暟灝嗚璋冪敤. 鎻掍歡鐨刴ain鍑芥暟涓嶄細琚皟鐢? 鎻掍歡鍙細琚垵濮嬪寲涓嬈? 涓嶈兘琚叧闂?/p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍥犳, 闇瑕佹墜鍔ㄥ皢init鍑芥暟鏀規垚鑷繁鐨勫嚱鏁? 緇熶竴鍦╯o鐨刴ain鍖呴噷璋冪敤</p></li></ul><h1><a href="file:///C:/Users/Davy/AppData/Local/Youdao/YNote/markdown/index.html#緙栬瘧" style="box-sizing: border-box; color: #4078c0; text-decoration-line: none;"></a>緙栬瘧</h1><ul data-source-line="80" style="box-sizing: border-box; margin-top: 0px; padding-left: 2em; color: #333333; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; line-height: 21px; widows: 1; background-color: #ffffff; margin-bottom: 0px !important;"><li style="box-sizing: border-box;"><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">濡備綍緙栬瘧鑾峰緱plugin鍖呮敮鎸佺殑鍔ㄦ佸簱</p><pre data-source-line="82" style="box-sizing: border-box; font-stretch: normal; font-size: 11.9px; line-height: 1.45; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; word-wrap: normal; margin-top: 0px; margin-bottom: 16px; padding: 16px; overflow: auto; border-radius: 3px; background-color: #f7f7f7;"><code style="box-sizing: border-box; display: inline; overflow: visible; padding: 0px; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; margin: 0px; font-size: 11.9px; border-radius: 3px; word-break: normal; border: 0px; line-height: inherit; word-wrap: normal; background: 0px 0px transparent;">SVCNAME=<span style="box-sizing: border-box; color: teal;">$1</span> SVCVER=<span style="box-sizing: border-box; color: teal;">$2</span> TIMESTAMP=`date <span style="box-sizing: border-box; color: #dd1144;">'+%Y%m%d_%H%M%S'</span>` go build -v -buildmode=plugin --ldflags=<span style="box-sizing: border-box; color: #dd1144;">"-pluginpath=${SVCNAME}_${TIMESTAMP}"</span> -o ${SVCNAME}<span style="box-sizing: border-box; color: teal;">_</span>${SVCVER}.so ${SVCNAME}</code></pre><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">-buildmode=plugin鏄噸瑕佸弬鏁?/p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">--ldflags閲岀殑-pluginpath鐨勪綔鐢ㄦ槸: 姣忔緙栬瘧鐨勫唴閮ㄨ瘑鍒礬寰勯兘鏄笉鍚岀殑, 閬垮厤閲嶅鍔犺澆鐨勮鍛?/p><p style="box-sizing: border-box; margin-top: 16px; margin-bottom: 16px;">鍙傝? <a style="box-sizing: border-box; color: #4078c0; text-decoration-line: none; background-color: transparent;">https://github.com/golang/go/issues/19004</a></p></li></ul><img src ="http://www.shnenglu.com/sunicdavy/aggbug/215057.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2017-07-06 12:47 <a href="http://www.shnenglu.com/sunicdavy/archive/2017/07/06/215057.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>浣跨敤Visual Studio Code璋冭瘯Golang宸ョ▼http://www.shnenglu.com/sunicdavy/archive/2017/04/20/214874.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 20 Apr 2017 04:52:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2017/04/20/214874.htmlhttp://www.shnenglu.com/sunicdavy/comments/214874.htmlhttp://www.shnenglu.com/sunicdavy/archive/2017/04/20/214874.html#Feedback0http://www.shnenglu.com/sunicdavy/comments/commentRss/214874.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/214874.html浣跨敤Visual Studio Code璋冭瘯Golang宸ョ▼

  • 鏈綆鍗曠殑璋冭瘯鏀葷暐
  • 澶氶」鐩皟璇? 閫傜敤涓漢寮鍙戝拰欏圭洰寮鍙?/li>
  • 鏃犻渶淇敼緋葷粺鐜鍙橀噺
  • 鍑嗗VSCode

    鍦ㄥ畼緗戜笅杞芥渶鏂扮増鐨刅SCode:

    https://code.visualstudio.com/

    瀹夎Golang鎻掍歡

    • 鎵撳紑鎵╁睍闈㈡澘

      VSCode->鏌ョ湅->鎵╁睍

    • 鎵懼埌Go鎻掍歡 鍦ㄦ悳绱㈡閲岃緭鍏o, 鎵懼埌絎簩琛屽啓鏈?Rich Go language support for Visual Studio Code鐨勬彃浠? 鐐瑰嚮瀹夎

      娉ㄦ剰涓嶆槸鎺掑悕鏈楂樼殑

    • 閲嶅惎緙栬緫鍣?/p>

  • 鎵撳紑璋冭瘯闈㈡澘

    VSCode->鏌ョ湅->璋冭瘯

  • 娣誨姞璋冭瘯鐩爣

    鍦?娌℃湁璋冭瘯"鐨勪笅鎷夋涓偣鍑?娣誨姞閰嶇疆.."

  • 娣誨姞鐩爣璋冭瘯閰嶇疆

    渚嬪瓙:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Launch",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "remotePath": "",
                "port": 2345,
                "host": "127.0.0.1",
                "program": "${fileDirname}",
                "env": {
                    "GOPATH":"D:/Develop/vscodegolang"
                },
                "args": [],
                "showLog": true
            }
        ]
    }
  • 鍏朵腑: "port", "host"閮芥槸go鎻掍歡鑷姩鐢熸垚鐨?/p>

    "env"涓鴻緗幆澧冨彉閲? 璁劇疆涓轟綘鐨勫伐紼嬬洰褰曞氨鍙互(鍖呭惈bin, src鐨勬枃浠跺す)

    鍑嗗璋冭瘯鎻掍歡

    姝ゆ椂鎵懼埌main.go鎸塅5, 浼氭姤閿欐彁紺?

    Failded to continue:"Cannot find Delve debugger. Install from https://github.com/derekparker/delve & ensure it is in your "GOPATH/bin" or "PATH"

    鎴戜滑浣跨敤go鍛戒護琛岀紪璇戣皟璇曞櫒

    go get github.com/derekparker/delve/cmd/dlv

    灝哾lv璋冭瘯鍣ㄦ斁鍦℅OPATH(宸ョ▼鐩綍)鐨刡in鐩綍涓?/p>

    閫変腑瑕佽皟璇曠殑main.go, 鐐瑰嚮F5, 鏃㈠彲浠ュ紑濮嬭皟璇?/p>

    璋冭瘯蹇嵎閿拰Visual Studio緋諱竴鑷?/p>

    • F9 鍒囨崲鏂偣
    • F10 Step over
    • F11 Step in
    • Shift+F11 Step out

    娉ㄦ剰鐐?/p>

    • 鏌愪簺緇撴瀯浣撴垚鍛樻棤娉曠洿鎺ユ樉紺烘椂, 鍙互鐩存帴閫変腑鍙橀噺鍚? 娣誨姞鍒扮洃瑙? 鎴栬呭彸閿偣鍑? "璋冭瘯:姹傚?

    鍦╨aunch.json涓彲浠ユ坊鍔犲緇勮皟璇曞叆鍙? 閫氳繃璋冭瘯闈㈡澘涓変腑瀵瑰簲鐨勯厤緗紑鍚笉鍚岀洰鏍囩殑璋冭瘯

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "client",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "remotePath": "",
                "port": 2345,
                "host": "127.0.0.1",
                "program": "${fileDirname}",
                "env": {
                    "GOPATH":"D:/Develop/vscodegolang"
                },
                "args": [],
                "showLog": true
            },
    
            {
                "name": "server",
                "type": "go",
                "request": "launch",
                "mode": "debug",
                "remotePath": "",
                "port": 2345,
                "host": "127.0.0.1",
                "program": "${workspaceRoot}/src/server",
                "env": {
                    "GOPATH":"D:/Develop/vscodegolang"
                },
                "args": [],
                "showLog": true
            }
        ]
    }

    "program"涓殑"${fileDirname}"鏄互褰撳墠閫変腑鏂囦歡浣滀負鍚姩鐐?/p>

    鏇村緩璁嬌鐢?program"鐨?${workspaceRoot}", 浠ュ寘鍚嶄綔涓哄惎鍔ㄧ偣鐨勬柟寮忚繘琛岄厤緗?/strong>

    https://code.visualstudio.com/Docs/editor/debugging



    ]]>Go璇█涓庢瀯閫犲嚱鏁?/title><link>http://www.shnenglu.com/sunicdavy/archive/2016/12/01/214457.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Thu, 01 Dec 2016 02:45:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2016/12/01/214457.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/214457.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2016/12/01/214457.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/214457.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/214457.html</trackback:ping><description><![CDATA[<p style="margin-right: 0px; margin-bottom: 10px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-top: 0px !important;">Golang涓病鏈夎璁℃瀯閫犲嚱鏁? 鍙栬屼唬涔嬬殑, 璁捐Golang鐨勫ぇ甯堝笇鏈涗綘鐢ㄦ櫘閫氬嚱鏁板幓瀹炵幇鏋勯犵殑浠誨姟. <br />涓鐩村彧鏄寰楄繖鍙槸浣撶幇Golang榪欓棬鏂拌璦鐨勭簿綆璁捐涔嬮亾, 鐩村埌鑷繁瀹炵幇緙栬瘧鍣ㄥ悗鎵嶅彂鐜版瀯閫犲嚱鏁扮殑璁捐鏈韓鏄煎緱鍟嗘Ψ鐨?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鎴戜滑鍏堢湅涓嬫瀯閫犲嚱鏁扮殑瑙勫垯</p><h1>鏋勯犲嚱鏁拌皟鐢ㄨ鍒?/h1><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鏋勯犲弬鏁伴噺: 0琛ㄧず娌℃湁鏋勯犲嚱鏁? 1琛ㄧず鏈夋瀯閫犲嚱鏁?涓弬鏁?/p><table style="margin: 10px 0px; border-collapse: collapse; border-style: solid; border-color: #bbbbbb; padding: 0px; color: #000000; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; font-size: 15px; line-height: 24px; widows: 1;"><thead><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: white;"><th style="padding: 6px 13px; border-collapse: collapse; border: 1px solid #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">鏈被鏋勯?/th><th style="padding: 6px 13px; border-collapse: collapse; border: 1px solid #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">鐖剁被鏋勯?/th><th style="padding: 6px 13px; border-collapse: collapse; border: 1px solid #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">澶勭悊鏂規硶</th></tr></thead><tbody><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: white;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">0</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">0</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">涓嶅鐞?/td></tr><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: #f8f8f8;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">1</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">0</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">璋冩湰綾籧tor</td></tr><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: white;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">0</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">1</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">璋冪埗綾籧tor</td></tr><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: #f8f8f8;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">1</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">1</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">璋冩湰綾籧tor, 鏈被ctor璋冪埗綾籧tor</td></tr><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: white;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">2</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">1</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">璋冩湰綾籧tor, 鏈被ctor璋冪埗綾籧tor</td></tr><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: #f8f8f8;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">1</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">2</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">鎶ラ敊, 鎵嬪姩璋冪埗綾籧tor</td></tr><tr style="border-top-width: 1px; border-top-style: solid; border-top-color: #cccccc; margin: 0px; padding: 0px; background-color: white;"><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">2</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">2</td><td style="padding: 6px 13px; border-collapse: collapse; border-style: solid; border-color: #cccccc; height: 28px; word-break: break-all; box-sizing: border-box; outline: none; margin: 0px; font-size: 14px;">鎶ラ敊, 鎵嬪姩璋冪埗綾籧tor</td></tr></tbody></table><h1>鏅氬嚱鏁伴噸杞借鍒?/h1><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">瀹為檯鍙敤鑰冭檻鏈鍏稿瀷鐨勪竴縐嶈涓? 瀹炰緥鍖栧瓙綾? 杞負鐖剁被璋冪敤鏂規硶, 榪欎釜鏃跺?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">濡傛灉鏂規硶鏄痮verride, 璋冪敤鐨勬槸瀛愮被</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">濡傛灉鏂規硶鏄痸irutal鎴栬呬笉鎸囨槑, 璋冪敤鐨勬槸鐖剁被</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鏁翠釜閲嶈澆榪囩▼, 瀛愮被緇濆涓嶄細闅愬紡璋冪敤鐖剁被鐨勮涓?/p><h1>闇瑕佹瀯閫犲嚱鏁頒箞?</h1><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鏋勯犲嚱鏁扮殑浼樼偣</p><ul style="margin: 10px 0px; padding-left: 32px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; font-size: 15px; line-height: 24px; widows: 1;"><li style="margin: 0px 0px 5px;">鏈韓灞炰簬涓縐嶇壒孌婄殑鎴愬憳鍑芥暟</li><li style="margin: 5px 0px;">緙栬瘧鍣ㄥ府浣犺嚜鍔ㄤ紶瀵艱皟鐢ㄧ埗綰?/li></ul><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鏋勯犲嚱鏁扮殑緙虹偣</p><ul style="margin: 10px 0px; padding-left: 32px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; font-size: 15px; line-height: 24px; widows: 1;"><li style="margin: 0px 0px 5px;">闅愬紡鐨勮皟鐢ㄨ鍒?/li><li style="margin: 5px 0px;">铏界劧灞炰簬鎴愬憳鍑芥暟, 浣嗘槸涓庡叾浠栨垚鍛樺嚱鏁拌皟鐢ㄨ鍒欏畬鍏ㄤ笉鍚? 闇瑕佺壒孌婅蹇?/li><li style="margin: 5px 0px;">甯﹀弬鏁扮殑鏋勯犲嚱鏁? 鍦ㄧ埗綾誨弬鏁板浜庡瓙綾繪椂, 闇瑕佸紩鐢ㄥ鏉傝娉曟潵瀹炵幇鐖剁駭鏋勯犺皟鐢?/li></ul><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍏跺疄鎴戜滑瀵瑰垵濮嬪寲鍑芥暟鐨勯渶姹傚彧鏈?鏉? 鑷畾涔?/p><p style="margin-top: 10px; margin-right: 0px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-bottom: 0px !important;">鎵浠? 鍙互鐞嗚ВGolang涓嶅姞鍏ユ瀯閫犲嚱鏁扮殑璁捐鏄紜殑 <br />鍗? 綆鍗? 娓呮櫚, 鏈夎寰?/p><img src ="http://www.shnenglu.com/sunicdavy/aggbug/214457.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2016-12-01 10:45 <a href="http://www.shnenglu.com/sunicdavy/archive/2016/12/01/214457.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Go璇█鐨勫喎鐭ヨ瘑http://www.shnenglu.com/sunicdavy/archive/2016/11/02/214375.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Wed, 02 Nov 2016 03:09:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2016/11/02/214375.htmlhttp://www.shnenglu.com/sunicdavy/comments/214375.htmlhttp://www.shnenglu.com/sunicdavy/archive/2016/11/02/214375.html#Feedback1http://www.shnenglu.com/sunicdavy/comments/commentRss/214375.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/214375.htmlappend, map, len涓嶆槸鍏抽敭瀛?/h1>

    浠栦滑鍏跺疄榪樻槸綾誨簱鍔熻兘, 閮藉湪buildin鍖呴噷鐨? 緋葷粺榛樿緇欎綘鍋氫簡涓?/p>

    1. import(
    2. . "buildin"
    3. )

    灝哹uildin鐨勫寘鍐呭閮芥槧灝勫埌鍏ㄥ眬鑰屽凡, 鍏跺疄浣犱篃鍙互鐢ㄨ嚜宸辯殑鍖呰繖涔堝仛

    鎵撳嵃鐨勫彟涓縐嶅啓娉?/h1>

    鎯寵窡鑴氭湰涓鏍瘋皟璇曟墦鍗版暟鎹箞?

    1. println("hello world")

    鏃犻渶鍖呭惈浠諱綍鍖? 鍥犱負瀹冨湪buildin鍖呴噷

    iota涓嶆槸榛戠鎶

    榪欐槸鍦╞uildin鍖呴噷鐨勫畾涔?/p>

    1. // iota is a predeclared identifier representing the untyped integer ordinal
    2. // number of the current const specification in a (usually parenthesized)
    3. // const declaration. It is zero-indexed.
    4. const iota = 0 // Untyped int.

    鍏跺疄go鏄湁娉涘瀷姒傚康鐨?/h1>

    鎯蟲兂map鍜屾暟緇勭殑瀹氫箟 
    鍙槸娉涘瀷娌℃湁寮鏀劇粰鐢ㄦ埛鐢ㄨ屽凡(鍙XX鏀劇伀,涓嶈XX鐐圭伅)

    map鏄敮鎸佸涓猭ey鐨? 鑰屼笖寰堟柟渚?/h1>

    榪樺湪涓哄涓猭ey杞琲d鐨勫鏉傜畻娉曡屽ご鐤間箞?

    1. type myKey struct{
    2. number int
    3. str string
    4. }
    5. func main(){
    6. t := map[ myKey] int {
    7. myKey{ 2, "world"}: 1,
    8. }
    9. fmt.Println(t[myKey{2, "world"}])
    10. }
    11. 杈撳嚭: 1

    鏋氫婦鏄彲浠ヨ漿鎴恠tring鐨?/h1>

    榛樿瀹氫箟涓涓灇涓?/p>

    1. type MyConst int
    2. const (
    3. MyConst_A MyConst = iota
    4. MyConst_B MyConst = iota
    5. )
    6. func main(){
    7. fmt.Println(MyConst_A)
    8. }

    杈撳嚭: 0 
    濡傛灉鎴戜滑鎯寵嚜鍔ㄥ寲杈撳嚭MyConst_A瀛楃涓叉椂 
    灝遍渶瑕佷嬌鐢╣olang鐨勪竴涓伐鍏烽摼:golang.org/x/tools/cmd/stringer 
    灝嗗叾涓嬭澆, 緙栬瘧鎴愬彲鎵ц宸ュ叿鍚? 瀵逛唬鐮佽繘琛岀敓鎴?nbsp;
    鐢熸垚鐨勪唬鐮佷細澶氬嚭涓涓獂x_string.go 
    閲岄潰灝辨槸鏋氫婦鐨凷tring()string 鍑芥暟

    涓存椂杞崲涓涓帴鍙e茍璋冪敤鐨勬柟娉?/h1>
    1. type love struct{
    2. }
    3. func (self*love)foo(){
    4. fmt.Println("love")
    5. }
    6. func main(){
    7. var chaos interface{} = new(love)
    8. chaos.(interface{
    9. foo()
    10. }).foo()
    11. }

    Golang鐨剅eceiver瀹為檯涓婂氨鏄痶his鐨勫彉縐嶅疄鐜?/h1>
    1. func( self*MyStruct) foo( p int ){
    2. }

    鍐欎笉鎯痳eceiver鐨勫啓娉? 濡傛灉榪欐牱鏀逛笅鍛?

    1. func foo( self *MyStruct, p int ){
    2. }

    鎵浠ヤ負浠涔堣Golang榪樻槸涓涓狢璇█鍢?/p>

    鍏充簬鍐呭瓨鍒嗛厤…

    • new 浼犲叆Type綾誨瀷, 榪斿洖*Type綾誨瀷
    • make 鍙互鍦ㄥ垎閰嶆暟緇勬椂璁劇疆棰勫垎閰嶅ぇ灝? new涓嶅彲浠?/li>
    • make 鑳藉垎閰嶆暟緇?map, 浣嗕笉鑳藉垎閰嶇粨鏋勪綋鍜屽師濮嬬被鍨?/li>
    • new 鑳藉垎閰嶆暟緇? map, 緇撴瀯浣撳拰鍘熷綾誨瀷絳夌殑鎵鏈夌被鍨?/li>
    • &Type絳夋晥浜巒ew
    • 鍒囩墖涓嶉渶瑕佸垎閰嶅唴瀛?make,new), 鐩存帴澹版槑灝卞彲浠ヤ簡…

    Golang鐨勫弽灝勬棤娉曢氳繃涓涓被鍨嬪悕, 鍒涘緩鍏跺疄渚?/h1>

    C#鏈堿ssembly姒傚康, 鍙互鍦ㄤ竴涓狝ssembly閲屾悳绱? 鍒涘緩瀹炰緥

    Golang鏄潤鎬佺被鍨嬭璦, 濡傛灉闇瑕? 鍙兘娉ㄥ唽浣犻渶瑕佸垱寤虹殑緇撴瀯浣? 鐒跺悗灝嗘敞鍐屽ソ鐨刴ap鐢ㄤ簬鍒涘緩

    Golang鍙互鏇挎崲Python鏉ヨ繘琛屽鏉傜殑宸ュ叿嫻佺▼澶勭悊

    濡傛灉浣犻渶瑕佽法騫沖彴鐨勫伐鍏鋒祦紼嬪鐞? 瀵筆ython涓嶇啛鎮? 鍙互浣跨敤

    1. go run yourcode.go 鍙傛暟1 鍙傛暟2

    鏂瑰紡鏉ヨ繘琛屽伐鍏峰鐞?nbsp;
    瑙夊緱鎱? 鍙互緙栬瘧鎴愬彲鎵ц鏂囦歡

    榪欐牱鍋氱殑濂藉: 濡傛灉鏈変簺綾誨簱鏈韓灝辨槸go鍐欑殑, Python鎯充嬌鐢ㄦ槸寰堥夯鐑︾殑, 鑰孏olang鏉ュ啓鍒欒交鑰屾槗涓?/p>

    渚嬪瓙: 閫氳繃go鐨刾rotobuf搴? 瀵逛竴浜涙枃浠惰繘琛屽鐞?/p>

    Golang鍙互鑷姩鎸佹湁鏂規硶鐨勬帴鏀惰呭疄渚?/h1>
    1. type myType struct{
    2. }
    3. func (self*myType) foo( p int){
    4. fmt.Println("hello", p )
    5. }
    6. func main(){
    7. var callback func( int )
    8. ins := new(myType)
    9. callback = ins.foo
    10. callback( 100 )
    11. }

    鍋氳繃lua鐨凜++浠g爜緇戝畾鐨勭闉嬮兘娓呮: lua鍙敮鎸佸閮ㄩ潤鎬佹垨鑰呭叏灞鍑芥暟璋冪敤 
    濡傛灉瑕佽繘琛孋++綾繪垚鍛樺嚱鏁拌皟鐢ㄦ椂, 瑕佽嚜宸卞鐞唗his鍜屾垚鍛樺嚱鏁?nbsp;
    榪欑鎶宸у洜涓烘棭璧風紪璇戝櫒鐨勮櫄琛ㄤ笉鍚屽鉤鍙板疄鐜扮粏鑺備笉緇熶竴闇瑕佷笓闂ㄥ鐞?nbsp;
    鍚庨潰璺ㄥ鉤鍙拌櫄琛ㄧ粺涓鍚? 綾繪垚鍛樺嚱鏁扮殑璋冪敤鍐欐硶涔熸槸寰堟伓蹇冨鏉傜殑 
    浣嗘槸Golang鐨勫皬鐧藉紡鐢ㄦ硶, 鐩存帴鍚婃墦C++, 鐢氳嚦C#澶嶆潅鐨刣elegate

    LiteIDE綃? 澶氬紑縐樼睄

    • 鎵懼埌 鑿滃崟->鏌ョ湅->閫夐」->閫氱敤->瀛樺偍->瀛樺偍璁劇疆鍒版湰鍦癷ni鏂囦歡

    • 鍏抽棴LiteIDE

    • 澶嶅埗LiteIDE鏁翠釜鐩綍, 鍛藉悕鏂囦歡澶逛負浣犵殑宸ョ▼鍚?/p>

    • 姣忎釜宸ョ▼鎵鍦ㄧ殑LiteIDE鐨勯厤緗皢鏄嫭绔嬬殑, 涓嶄細浜掔浉騫叉壈

    LiteIDE綃? 嫻嬭瘯紼嬪簭涔熸槸鍙互璋冭瘯鐨?/h1>

    鍒互涓虹▼搴忎竴瀹氳鏄痬ain寮濮嬬殑鎵嶅彲浠ヨ皟璇?/p>

    Golang鐨勬祴璇曠▼搴忚櫧鐒墮兘鏄竴涓釜Test寮澶寸殑鍑芥暟,浣嗘墽琛実o test鏃? 榪樻槸鏈塵ain鍏ュ彛

    鍦↙iteIDE涓? 鍙互鍦?璋冭瘯->寮濮嬭皟璇曟祴璇曠▼搴忛噷榪涜嫻嬭瘯紼嬪簭璋冭瘯

    LiteIDE綃? 鍦╓indows涓婂彲浠ヨ緭鍑簂inux鍙墽琛屾枃浠?/h1>

    go鐨勫伐鍏烽摼榛樿鏀寔浜ゅ弶緙栬瘧 
    鍦↙iteIDE涓? 鍙互閫氳繃鍒囨崲杈撳嚭騫沖彴, 杈撳嚭涓嶅悓騫沖彴鐨勫彲鎵ц鏂囦歡



    ]]>浣跨敤delve璋冭瘯Golang紼嬪簭鎶宸?/title><link>http://www.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Sat, 03 Sep 2016 10:12:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/214254.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/214254.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/214254.html</trackback:ping><description><![CDATA[<p style="margin-right: 0px; margin-bottom: 10px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-top: 0px !important;"></p><p style="margin-right: 0px; margin-bottom: 10px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-top: 0px !important;">Google瀹樻柟涓篏olang鐨勮皟璇曚緥瀛愰粯璁や嬌鐢ㄤ簡gdb</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鐒惰? 浣跨敤gdb璋冭瘯go紼嬪簭浼氶亣鍒癵oroutine鐨勫悇綾婚棶棰? 鍥犱負gdb涓嶆噦go</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍥犳, 榪欓噷浣跨敤delve榛戠鎶鏉ヨ繘琛孏olang鐨勭▼搴忚皟璇?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">綰懡浠よ璋冭瘯鏂規硶鍦ㄧ綉涓婂緢瀹規槗鎼滅儲鍒? 鏈枃涓昏浠iteIDE鏉ヨ繘琛岀▼搴忚皟璇?/p><h1>鍏抽棴緙栬瘧鍣ㄤ紭鍖?/h1><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">姝e父go build/install鍑虹殑go紼嬪簭鏄畬鍏ㄤ紭鍖栬繃鐨? 寮鴻浣跨敤璋冭瘯鍣ㄦ寕鎺ヨ皟璇曟椂, 鏌愪簺local鍙橀噺/lamda琛ㄨ揪寮忔崟鑾風殑鍙橀噺浼氱洿鎺ヨ繘鍏ュ瘎瀛樺櫒, 鏃犳硶浣跨敤璋冭瘯鍣ㄦ煡鐪?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍒犳帀鎵鏈夌殑pkg, 涓篵uild鎴杋nstall鍙傛暟鍔犲叆鍏抽棴緙栬瘧鍣ㄤ紭鍖栫殑鍙傛暟 -gcflags "-N -l"</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">渚嬪:</p><pre linenums="" prettyprinted"="" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid #e1e1e8; font-size: 13px; line-height: 19px; overflow: auto; padding: 10px; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; box-shadow: #fbfbfc 40px 0px 0px inset, #ececf0 41px 0px 0px inset; widows: 1; background-color: #f7f7f9;"><ol style="margin: 0px; padding-left: 30px !important; color: #1e347b;"><li style="margin: 0px; color: #bebec5; line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code style="margin: 0px; padding: 0px; border: none; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; max-width: 100%; background: transparent;"><span style="color: #48484c; margin-top: 0px;"> go install </span><span style="color: #93a1a1;">-</span><span style="color: #48484c;">gcflags </span><span style="color: #dd1144;">"-N -l"</span><span style="color: #48484c;"> svc\gamesvc</span></code></li></ol></pre><h2>delve璋冭瘯鍣ㄥ畨瑁呮柟娉?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">LiteIDE鑷甫浜唃db, 浣嗘槸娌℃湁delve璋冭瘯鍣? 闇瑕佽嚜琛屽畨瑁? 鍛戒護濡備笅</p><pre linenums="" prettyprinted"="" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid #e1e1e8; font-size: 13px; line-height: 19px; overflow: auto; padding: 10px; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; box-shadow: #fbfbfc 40px 0px 0px inset, #ececf0 41px 0px 0px inset; widows: 1; background-color: #f7f7f9;"><ol style="margin: 0px; padding-left: 30px !important; color: #1e347b;"><li style="margin: 0px; color: #bebec5; line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code style="margin: 0px; padding: 0px; border: none; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; max-width: 100%; background: transparent;"><span style="color: #48484c; margin-top: 0px;">go </span><span style="color: #1e347b;">get</span><span style="color: #48484c;"> github</span><span style="color: #93a1a1;">.</span><span style="color: #48484c;">com</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">derekparker</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">delve</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">cmd</span><span style="color: #93a1a1;">/</span><span style="color: #48484c;">dlv</span></code></li></ol></pre><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">delve璋冭瘯鍣ㄤ細琚斁鍒頒綘鐨凣OPATH/bin涓?/p><h1>LiteIDE涓殑delve璋冭瘯鍣ㄩ厤緗?/h1><h2>閫夋嫨璋冭瘯鍣?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍦↙iteIDE鑿滃崟涓夋嫨 璋冭瘯->debugger/delve</p><h2>delve鐜鍙橀噺璁劇疆</h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">榪欎釜鏃跺? LiteIDE渚濈劧鎵句笉鍒癲elve, 鍥犱負瀹冧笉鍦ㄧ幆澧冨彉閲廝ATH涓? 榪欓噷鏃犻渶淇敼鐜鍙橀噺, 鍙渶瑕丩iteIDE鐨勭幆澧冮厤緗?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍦↙iteIDE鑿滃崟涓夋嫨 鏌ョ湅->緙栬緫褰撳墠鐜, 鍦ㄥ脊鍑虹殑鏂囨。涓慨鏀?/p><pre linenums="" prettyprinted"="" style="margin-top: 10px; margin-bottom: 10px; border: 1px solid #e1e1e8; font-size: 13px; line-height: 19px; overflow: auto; padding: 10px; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; box-shadow: #fbfbfc 40px 0px 0px inset, #ececf0 41px 0px 0px inset; widows: 1; background-color: #f7f7f9;"><ol style="margin: 0px; padding-left: 30px !important; color: #1e347b;"><li style="margin: 0px; color: #bebec5; line-height: 18px; padding-left: 12px !important; list-style-type: decimal !important;"><code style="margin: 0px; padding: 0px; border: none; border-radius: 3px; word-wrap: break-word; font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; max-width: 100%; background: transparent;"><span style="color: #48484c; margin-top: 0px;">PATH</span><span style="color: #93a1a1;">=</span><span style="color: #48484c;">c</span><span style="color: #93a1a1;">:</span><span style="color: #48484c;">\mingw32\b</span><span style="color: #1e347b;">in</span><span style="color: #93a1a1;">;%</span><span style="color: #48484c;">GOROOT</span><span style="color: #93a1a1;">%</span><span style="color: #48484c;">\b</span><span style="color: #1e347b;">in</span><span style="color: #93a1a1;">;%</span><span style="color: #48484c;">PATH</span><span style="color: #93a1a1;">%;</span><span style="color: #48484c;">c</span><span style="color: #93a1a1;">:</span><span style="color: #48484c;">\y</span><span style="color: #1e347b;">our</span><span style="color: #48484c;">\path\to\delve</span></code></li></ol></pre><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">鍘繪帀PATH鍓嶇殑娉ㄩ噴#, 鍦?PATH%娣誨姞鍒嗗彿, 鐒跺悗鍜屼綘鍒癲elve璋冭瘯鍣ㄧ殑璺緞</p><h2>寮濮嬭皟璇?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">閫夋嫨浣犵殑宸ョ▼, 鐐瑰嚮F5, 榪涘叆璋冭瘯妯″紡</p><h2>璋冭瘯鍣ㄦ樉紺哄彉閲忓?/h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;"><img src="file:///D:/Documents/My%20Knowledge/temp/6f9eec62-fe6c-4f28-89ad-acbade688a96/4/index_files/2be001ea-878e-4e38-9209-76ef93d427f0.png" style="border: 0px; max-width: 100%; margin: 2px 0px; height: auto !important;" alt="" /></p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">LiteIDE浣跨敤delve璋冭瘯鏃? 鏃犳硶鍦?鍙橀噺 鐩戣絳夌獥鍙d腑姝g‘鎹曟崏delve璋冭瘯榪斿洖鏁版嵁(鍥犱負鏍煎紡澶鏉備簡…)</p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">娌″叧緋? 鎴戜滑浣跨敤鍛戒護琛岄厤鍚堟樉紺哄嵆鍙?/p><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">LiteIDE鎺у埗鍙版垨璋冭瘯杈撳嚭紿楀彛鍦╠elve璋冭瘯鏃? 瀹為檯涓婃槸涓涓爣鍑嗗懡浠よ <br />鍛戒護濡備笅</p><ul style="margin: 10px 0px; padding-left: 32px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; font-size: 15px; line-height: 24px; widows: 1;"><li style="margin: 0px 0px 5px;"><p style="margin: 0px;">p 鍙橀噺鍚嶅彲浠ユ煡鐪嬪彉閲忓?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">locals鏌ョ湅灞閮ㄥ彉閲?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">ls鍙煡鐪嬪綋鍓嶆枃浠?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">stack鏌ョ湅鏍?/p></li><li style="margin: 5px 0px;"><p style="margin: 0px;">help鍙互鏌ョ湅鍚勭甯姪</p></li></ul><h2>璋冭瘯澶栭儴紼嬪簭</h2><p style="margin: 10px 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1;">濡傛灉浣犵殑紼嬪簭鏄閮ㄧ▼搴? 鎴栬呬嬌鐢╣o install瀹夎鍒癎OPATH/bin鐩綍鐨勭▼搴? 閭d箞浣跨敤delve璋冭瘯鍣ㄥ惎鍔ㄧ▼搴忔椂, 鍙兘浼氱鍒板惎鍔ㄨ礬寰勯敊璇殑闂</p><p style="margin-top: 10px; margin-right: 0px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-bottom: 0px !important;">浣跨敤LiteIDE鑿滃崟 璋冭瘯->璋冭瘯鍏朵粬搴旂敤紼嬪簭… 濉叆浣犺璋冭瘯紼嬪簭鐨勮礬寰勪互鍙婂伐浣滅洰褰? 鍙互瑙e喅榪欎釜闂</p><p style="margin-top: 10px; margin-right: 0px; margin-left: 0px; font-size: 15px; font-family: Helvetica, "Hiragino Sans GB", 寰蔣闆呴粦, "Microsoft YaHei UI", SimSun, SimHei, arial, sans-serif; line-height: 24px; widows: 1; margin-bottom: 0px !important;"></p><img src ="http://www.shnenglu.com/sunicdavy/aggbug/214254.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2016-09-03 18:12 <a href="http://www.shnenglu.com/sunicdavy/archive/2016/09/03/214254.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Golang鐨勭畝鍗曞弽灝勬ц兘嫻嬭瘯http://www.shnenglu.com/sunicdavy/archive/2016/08/12/214152.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Fri, 12 Aug 2016 07:26:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2016/08/12/214152.htmlhttp://www.shnenglu.com/sunicdavy/comments/214152.htmlhttp://www.shnenglu.com/sunicdavy/archive/2016/08/12/214152.html#Feedback0http://www.shnenglu.com/sunicdavy/comments/commentRss/214152.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/214152.html嫻嬭瘯鐢ㄤ緥

    鎴戜滑瀵笹olang鐨勭粨鏋勪綋鍙橀噺璧嬪? 浠ュ強鍗曞弬鏁板嚱鏁拌皟鐢ㄨ繘琛屽弽灝勫拰native鎿嶄綔鐨勬祴璇?pre>

     

    package main

     

    import (

    "reflect"

    "testing"

    )

     

    type data struct {

    Hp int

    }

     

    const AssignTimes = 100000000

     

    func TestNativeAssign(t *testing.T) {

     

    v := data{Hp: 2}

     

    for i := 0; i < AssignTimes; i++ {

    v.Hp = 3

    }

     

    }

     

    func TestReflectAssign(t *testing.T) {

     

    v := data{Hp: 2}

     

    vv := reflect.ValueOf(&v).Elem()

     

    f := vv.FieldByName("Hp")

     

    for i := 0; i < AssignTimes; i++ {

     

    f.SetInt(3)

    }

     

    }

     

    func TestReflectFindFieldAndAssign(t *testing.T) {

     

    v := data{Hp: 2}

     

    vv := reflect.ValueOf(&v).Elem()

     

    for i := 0; i < AssignTimes; i++ {

     

    vv.FieldByName("Hp").SetInt(3)

    }

     

    }

     

    func foo(v int) {

     

    }

     

    const CallTimes = 100000000

     

    func TestNativeCall(t *testing.T) {

    for i := 0; i < CallTimes; i++ {

     

    foo(i)

    }

    }

     

    func TestReflectCall(t *testing.T) {

     

    v := reflect.ValueOf(foo)

     

    for i := 0; i < CallTimes; i++ {

     

    v.Call([]reflect.Value{reflect.ValueOf(2)})

    }

    }

    鎬ц兘嫻嬭瘯鏁版嵁

    === RUN TestNativeAssign
    鈥?PASS: TestNativeAssign (0.03s)
    === RUN TestReflectAssign
    鈥?PASS: TestReflectAssign (0.41s)
    === RUN TestReflectFindFieldAndAssign
    鈥?PASS: TestReflectFindFieldAndAssign (9.86s)
    === RUN TestNativeCall
    鈥?PASS: TestNativeCall (0.03s)
    === RUN TestReflectCall
    鈥?PASS: TestReflectCall (21.46s)

    嫻嬭瘯璇勬祴

    • 鍦ㄧ粨鏋勪綋鍙橀噺璧嬪兼祴璇曠敤渚嬩腑, 鎴戜滑鍙戠幇TestReflectFindFieldAndAssign璧嬪兼牸澶栫殑鑰楁椂. 鍒嗘瀽鎬ц兘鐐瑰湪FieldByName榪欎釜鍑芥暟涓? 鎴戜滑鏌ヤ簡涓嬪簳灞傚浣曞疄鐜扮殑:

    // FieldByName returns the struct field with the given name

    // and a boolean to indicate if the field was found.

    func (t *structType) FieldByName(name string) (f StructField, present bool) {

    // Quick check for top-level name, or struct without anonymous fields.

    hasAnon := false

    if name != "" {

    for i := range t.fields {

    tf := &t.fields[i]

    if tf.name == nil {

    hasAnon = true

    continue

    }

    if *tf.name == name {

    return t.Field(i), true

    }

    }

    }

    if !hasAnon {

    return

    }

    return t.FieldByNameFunc(func(s string) bool { return s == name })

    }

    鍚勪綅鐪嬪畼蹇呴』鍚愭Ы鐢╢or鏉ラ亶鍘嗚幏鍙栨暟鎹? 浣嗗喎闈欎笅鏉ュ垎鏋? 榪欐牱鍋氭棤鍙帤闈?
    璇曟兂濡傛灉reflect鍖呭湪鎴戜滑浣跨敤ValueOf鏃朵嬌鐢╩ap緙撳啿濂戒竴涓粨鏋勪綋鎵鏈夊瓧孌電殑璁塊棶鏁版嵁鍚? 鑲畾璁塊棶鎸囧畾瀛楁閫熷害浼氬緢蹇?br>浣嗘槸, 浠ョ┖闂存崲閫熷害鐨勯渶姹傚叾瀹炴渶澶氭弧瓚充簡1%鐨勯渶姹?
    鍚屾牱鐨勪緥瀛愭槸鍥懼艦API閲岃闂甋hader鍙橀噺鐨勬柟娉? 鎬繪槸榛樿浣跨敤瀛楃涓茶幏鍙? 閫熷害寰堟參. 褰撲綘鎯沖揩閫熻闂椂, 璇鋒彁鍓嶆寜闇緙撳瓨瀛楁
    閭d箞, Golang浣跨敤鐨勪篃鏄繖鏍風殑鎬濊礬. 铏界劧鏆村姏浜嗕竴鐐? 浣嗘槸鑳藉璁╃▼搴忚窇瀵? 鎬ц兘浼樺寲鐨勪笢瑗挎斁鍦ㄤ箣鍚庢潵鍋? 緙撳啿涓嬪氨鍙互瑙e喅

    • 鍦ㄨ皟鐢ㄦ祴璇曠敤渚嬩腑, 姣棤鎮康鐨? 璋冪敤閫熷害寰堟參
      鍥犳, 鎴戜滑鍦ㄥ鉤鏃朵嬌鐢ㄥ弽灝勬椂, 灝介噺鍋忓悜浜庡弽灝勫彉閲忕紦鍐插瓨鍦ㄤ笅鐨勫彉閲忚祴鍊兼垨鑰呰幏鍙?br>鑰岃皟鐢ㄧ殑闇姹傚敖閲忓噺灝? 濡傛灉鏈塯oroutine瀛樺湪鐨勬儏鍐典笅, 鍒欎笉蹇呭お澶氭媴蹇?


    ]]>
    Google Protobuf 3鐗堟湰浠嬬粛http://www.shnenglu.com/sunicdavy/archive/2016/01/25/212739.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Mon, 25 Jan 2016 06:23:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2016/01/25/212739.htmlhttp://www.shnenglu.com/sunicdavy/comments/212739.htmlhttp://www.shnenglu.com/sunicdavy/archive/2016/01/25/212739.html#Feedback0http://www.shnenglu.com/sunicdavy/comments/commentRss/212739.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/212739.html鏈枃緙栧啓鏃? Google 瀹樻柟鐨?protobuf 鐗堟湰鏄?.0.0beta

    涓嬮潰浠嬬粛涓媝roto3鐨勪竴浜涚粏鑺傚彉鍖?/p>

    Proto3鐨勮娉曞彉鍖?/h1>

    璇硶鏍囪

    榪欎釜鐗堟湰鐨刾rotoc鐨刾rotobuf緙栬瘧鍣ㄥ凡緇忓彲浠ユ敮鎸乸roto2璇硶鍜宲roto3鐨勮娉?/p>

    濡傛灉浣犵殑proto鏂囦歡娌℃湁娣誨姞syntax璇存槑鐨勮瘽, 鐢ㄨ繖涓増鏈殑緙栬瘧鍣ㄤ細鎶ラ敊, 鎻愮ず浣犻粯璁roto2鏀寔, 璇鋒坊鍔犺娉曟爣璁?/p>

    syntax = "proto2";

     

    optional涓嶉渶瑕佷簡

    鍙繚鐣檙epeated鏍囪鏁扮粍綾誨瀷, optional鍜宺equired閮借鍘繪帀浜?/p>

    瀹為檯浣跨敤璇佹槑, required鐨勮璁$‘瀹炴槸铔嬬柤, C++鐨勮皟璇曠増浼氬脊鍑篴ssert,release鐗堝拰optional涔熸病鍟ュ尯鍒?/p>

    map鏀寔

    map緙栧啓鏍煎紡涓?/p>

    map<key_type, value_type> map_field = N;
    渚嬪:
    map<string, Project> projects = 3;
    浠g爜鐢熸垚紜鏀寔map, 榪欏浜庡緢澶氳璦鏉ヨ鍙堝彲浠ュ伔鎳掍簡

    瀛楁default鏍囪涓嶈兘浣跨敤浜?/h2>

    浣嶄簬proto2璇硶鐨勫瓧孌祅umber鍚庣殑[default=XX]

    榪欎釜涓滆タ涓嶈兘鐢ㄤ簡, 鐞嗙敱鏄?

    瀵逛簬鍚屼竴孌靛簭鍒楀寲鍚庣殑鏁版嵁, 濡傛灉搴忓垪鍖栫鐨刣efault鍜屽弽搴忓垪鍖栫鐨刣efault鎻忚堪涓嶄竴鏍蜂細瀵艱嚧鏈緇堢粨鏋滃畬鍏ㄤ笉涓鑷?/p>

    鍗? 鍚屼竴涓暟鎹袱涓粨鏋? 榪欐槸涓嶅彲棰勬祴鐨勭粨鏋? 鍥犳騫叉帀榪欎釜鐗規?/p>

    涓嶈繃鏈漢瑙夊緱, 瀵逛簬娓告垙鏉ヨ, 榪欎釜鍔熻兘鏈韓鍙互鍘嬬緝寰堝鏁版嵁,铏界劧浼氭湁闅愭偅

     

    鏋氫婦榛樿鍊間竴瀹氭槸0

    proto2閲岀殑榛樿鍊兼槸鏋氫婦鐨勭涓涓獀alue瀵瑰簲鐨勫? 涓嶄竴瀹氫負0

    proto3鍦ㄤ綘瀹氫箟value鏃? 寮哄埗瑕佹眰絎竴涓煎繀欏諱負0

    榪欎釜淇敼涓洪伩鍏嶉殣鎮h繕鏄湁甯姪鐨?/p>

    娉涘瀷鎻忚堪鏀寔

    any綾誨瀷, 鍙互浠h〃浠諱綍綾誨瀷, 鍙互鍏堣榪涙潵, 鍐嶈繘琛岃В鏋? 娌″叿浣撶敤, 姝ュ瓙璺ㄥぇ浜嗘曟壇鍒拌泲

    鏀寔json搴忓垪鍖?/h2>

    榪欎釜鏋佸ソ, json鍐嶆琚悓鍖栦簡

    澧炲姞浜嗗縐嶈璦鏀寔

    js, objc, ruby, C#絳夌瓑

    鐒惰? C#鐗堟湰鐨勫熀紜runtime搴撴槸鐢–# 6.0鐨勮娉曞啓鐨?榪欏浜嶶nity mono紲栦紶2.0鏉ヨ, 紜疄鎵埌铔嬩簡,娌℃硶鐢?/p>

    Protobuf鐜板湪浣跨敤CMAKE鍋氶厤緗郴緇?/h2>

    緙栬瘧璧鋒潵紼嶅井楹葷儲, 榪樿涓嬩釜琚鎺夌殑cmake鈥?/p>

     

     

    絎笁鏂瑰簱閲屽浜巔roto3鐨勫彉鍖?/h1>

    Golang鐨勫畼鏂筽rotobuf鏀寔: https://github.com/golang/protobuf

    鐢熸垚浠g爜涓殑緇撴瀯浣撳瓧孌電被鍨嬪彉鍖?/h2>

    瀵逛簬proto2鐨勬枃浠? 鐢熸垚鐨刧o浠g爜涓殑緇撴瀯浣撲緷鐒朵嬌鐢ㄧ被鍨嬫寚閽堜綔涓洪粯璁ゅ瓨鍌? 鍏煎鑰佺殑緋葷粺

    瀵逛簬proto3鐨勬枃浠? 鐢熸垚鐨刧o浠g爜涓殑緇撴瀯浣撶洿鎺ヤ嬌鐢ㄥ瓧孌典綔涓洪粯璁ゅ瓨鍌? 涓嶅啀浣跨敤GetXXX鏉ヤ綔涓哄瓧孌靛艱闂? 璧嬪兼椂涔熸棤闇浣跨敤proto.綾誨瀷() 鍑芥暟榪涜鎸囬拡綾誨瀷瀛楁鍊煎垱寤?

    榪欎釜璋冩暣寰堟槸鏂逛究, 浣嗕涪澶變簡optional鍒ゆ柇鍔熻兘, 瀵瑰簲C++閲屽氨鏄痟asXXX鐨勫姛鑳? 涓嶈繃濂芥榪欎釜閫昏緫鐜板湪鐢ㄧ殑涓嶅浜?/p>

    榪欎釜淇敼澶ф涔熸槸閰嶅悎json搴忓垪鍖栨潵鍋氱殑, go榛樿鐨刯son搴忓垪鍖栨椂, 鏃犳硶浣跨敤proto2鐢熸垚鐨勭粨鏋勪綋鐨? 鍥犱負閮芥槸鎸囬拡,鏃犳硶璧嬪?.

     

    鏂扮増protoc-gen-go鐨勬彃浠朵細鐢熸垚descriptor鐨勫帇緙╂暟鎹?/h2>

    鏂版彃浠朵細緇欐瘡嬈$敓鎴愮殑鏂囦歡娣誨姞榪欐牱涓孌典唬鐮?/p>

    var fileDescriptor0 = []byte{
        // 220 bytes of a gzipped FileDescriptorProto
        0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x8f, 0xcd, 0x4e, 0xc5, 0x20,
        0x10, 0x85, 0x53, 0xbd, 0x35, 0x32, 0xb7, 0xdd, 0x4c, 0x5c, 0xb0, 0x70, 0x71, 0xd3, 0xb8, 0x70,
        0x75, 0x17, 0xfa, 0x04, 0xc6, 0xd8, 0xb8, 0x50, 0x63, 0xa8, 0x2f, 0x80, 0xed, 0x44, 0x89, 0x28,
        0x04, 0xc6, 0xbf, 0x47, 0xf1, 0x6d, 0x95, 0x49, 0x8d, 0x4d, 0x5c, 0x01, 0xdf, 0x39, 0x7c, 0x30,
        0x00, 0x1c, 0x82, 0xdf, 0xc6, 0x14, 0x38, 0xe0, 0xaa, 0xec, 0xbb, 0x37, 0x68, 0x2e, 0x3e, 0x62,
        0x48, 0x7c, 0x49, 0x76, 0xa2, 0x84, 0x47, 0xd0, 0xde, 0x96, 0xf8, 0xee, 0x33, 0xd2, 0x8d, 0x7d,
        0x26, 0x5d, 0x6d, 0xaa, 0x63, 0x65, 0xda, 0xb8, 0x84, 0xd8, 0x41, 0x63, 0xc2, 0x7b, 0xef, 0xc8,
        0x4f, 0x52, 0xda, 0x91, 0x52, 0x93, 0x16, 0x0c, 0x0f, 0x41, 0x89, 0xa9, 0x77, 0x9e, 0xf4, 0xae,
        0x14, 0x54, 0xfc, 0x05, 0xdd, 0x57, 0x05, 0x4a, 0xba, 0xd7, 0xc4, 0x16, 0xb7, 0x80, 0x03, 0x27,
        0xf7, 0xf2, 0x70, 0x72, 0xe5, 0x32, 0x0f, 0xd1, 0x3b, 0xa6, 0x34, 0x5b, 0x31, 0xff, 0x4b, 0x70,
        0x03, 0x6b, 0x43, 0x91, 0x2c, 0x9f, 0x3f, 0xd2, 0xf8, 0x24, 0xf6, 0x7d, 0xb3, 0x4e, 0x7f, 0x08,
        0x0f, 0xa0, 0x3e, 0xf3, 0xce, 0x66, 0xbd, 0x12, 0x49, 0x6d, 0xcb, 0xa1, 0x4c, 0x37, 0xbf, 0xf3,
        0xb3, 0xbc, 0x8e, 0xac, 0x6b, 0xb9, 0xd9, 0xe6, 0x25, 0xbc, 0xdf, 0x93, 0x6f, 0x9e, 0x7e, 0x07,
        0x00, 0x00, 0xff, 0xff, 0x0c, 0x9f, 0x10, 0xa8, 0x2e, 0x01, 0x00, 0x00,
    }

    瀵逛簬meta淇℃伅鐨勬彁鍙栬繕鏄緢鏂逛究鐨?/p>

    鐒惰?/p>

    瀵逛簬澶氫釜鏂囦歡鐨勭敓鎴? 榪欐牱鍋氶潪甯哥殑楹葷儲, 鍥犱負榪欎釜瀛楁浼氶噸澶嶅鑷寸紪璇戦敊璇?/p>

    寰堝浜哄湪璁哄潧閲屽悙妲? 瀹樻柟緇欏嚭鐨勮В鍐蟲柟娉曟槸, 浣跨敤protoc涓嬈℃т紶鍏ヤ竴涓猵ackage涓嬬殑鎵鏈夌殑proto鐩存帴鐢熸垚涓涓猤o

    鑰屼笉鏄幇鍦ㄧ殑涓涓猵roto涓涓猤o

    鐢熸垚浠g爜浼氳嚜鍔ㄦ敞鍐屽埌鍏ㄥ眬, 騫跺彲浠ユ柟渚跨殑鏌ヨ

    浠ュ墠榪欎釜浠g爜闇瑕佽嚜宸辨潵鍋? 鐜板湪瀹樻柟鎻愪緵浜嗘敮鎸? 寰堟槸鏂逛究

    鐒惰? 涓轟粈涔堜笉鏀寔閬嶅巻鈥?孌嬪康鍟? 鍙堣鑷繁鍔ㄦ墜浜?/p>

    ]]>
    鍩轟簬Protobuf鐨勭數瀛愯〃鏍煎鍑哄櫒tabtoy寮婧?/title><link>http://www.shnenglu.com/sunicdavy/archive/2016/01/25/212738.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Mon, 25 Jan 2016 06:00:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2016/01/25/212738.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/212738.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2016/01/25/212738.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/212738.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/212738.html</trackback:ping><description><![CDATA[<p>欏圭洰鍦板潃:</p> <p><a title="https://github.com/davyxu/tabtoy" >https://github.com/davyxu/tabtoy</a></p><img src ="http://www.shnenglu.com/sunicdavy/aggbug/212738.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2016-01-25 14:00 <a href="http://www.shnenglu.com/sunicdavy/archive/2016/01/25/212738.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏈嶅姟鍣ㄥ紑鍙戣璦姣旇緝http://www.shnenglu.com/sunicdavy/archive/2016/01/05/212611.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Tue, 05 Jan 2016 08:51:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2016/01/05/212611.htmlhttp://www.shnenglu.com/sunicdavy/comments/212611.htmlhttp://www.shnenglu.com/sunicdavy/archive/2016/01/05/212611.html#Feedback10http://www.shnenglu.com/sunicdavy/comments/commentRss/212611.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/212611.html浠ヤ笅姣旇緝鐨勫熀紜閮芥槸鍩轟簬涓縐嶇紪紼嬭璦+涓瀹氱殑絎笁鏂規垨鑰呰嚜宸辯紪鍐欑殑緗戠粶搴撳拰搴曞眰榪涜鐨勶紝Skynet紼嶅井鐗規畩錛屼絾鎬諱綋姣旇緝鍚堥傛斁鍒版瘮杈冧腑鏉?/p>

    C#

    寮鍙戞晥鐜囷細Windows涓嬪彲浠ラ氳繃VisualStudio榪涜寮鍙戯紝鍏朵粬騫沖彴鍙互浣跨敤MonoDevelop錛岄潪甯告柟渚?/p>

    榪愯鏁堢巼錛欽IT鐨勬ц兘浼樺寲姣旇緝鍒頒綅錛岃兘閫傚簲90%鎬ц兘鐜

    閮ㄧ講渚挎嵎鎬э細鍙互閫氳繃浜ゅ弶緙栬瘧鐢熸垚鍏朵粬騫沖彴鐨勫彲鎵ц鏂囦歡錛岄氳繃mono榪愯鍙墽琛屾枃浠?/p>

    璋冭瘯渚挎嵎鎬э細VisualStudio鍜孧onoDevelop璋冭瘯鍧囧緢鏂逛究錛?榪樺彲榪滅▼璋冭瘯

    涓婃墜搴︼細瀵笴緋昏璦鐔熸倝鐨勫嚑澶╁氨鍙笂鎵?/p>

    鐑洿鏂幫細鍙互閫氳繃DLL鏂瑰紡榪涜

    Web瀵規帴錛氬彲鍋氾紝浠g爜姣旇緝鍟板棪

    宕╂簝澶勭悊錛氬彲閫氳繃try catch鎹曡幏閿欒

    緗戠粶搴撶紪鍐欓毦搴︼細涓鑸紝闇娉ㄦ剰gc闂

    絎笁鏂圭綉緇滃簱鍙婃鏋舵暟閲忥細涓鑸?/p>

     

    Golang

    寮鍙戞晥鐜囷細楂?/p>

    榪愯鏁堢巼錛氬茍鍙戜笂闈炲父鏈変紭鍔匡紝瀵笴PU鍒╃敤鐜囨瘮杈冮珮錛屽師鐢熻繍琛屾棤铏氭嫙鏈?/p>

    閮ㄧ講渚挎嵎鎬э細涓嬈$紪璇戝埌澶勮繍琛岋紝鏃犱換浣曡繍琛屽簱渚濊禆

    璋冭瘯渚挎嵎鎬э細瀹為檯鎿嶄綔涓紝鍗曠嚎紼嬫寕鎺ヨ皟璇曞櫒鍙錛?浣嗗彉閲忔樉紺轟笉姝g‘錛屽紑鍙戞湡鍩烘湰閲囩敤鏃ュ織鏂瑰紡榪涜鏌ラ敊

    涓婃墜搴︼細璇█綆鍗曪紝鐗規у皯錛?鏂版墜1鍛ㄨ兘璐$尞浠g爜

    鐑洿鏂幫細鏃犳硶榪涜鐑洿鏂幫紝璇█鏃犳硶緙栬瘧涓篋LL錛屼篃涓嶆敮鎸丏LL鍔犺澆錛坙inux騫沖彴鐨?so鍔犺澆蹇界暐涓嶈錛?/p>

    Web瀵規帴錛氶潪甯告柟渚匡紝 浠g爜綺劇畝

    宕╂簝澶勭悊錛氬穿婧冨悗浠ュ懡浠よ鏂瑰紡鎵撳嵃鍑烘爤錛岀▼搴忓唴鍙互鎹曡幏浠諱綍宕╂簝閿欒騫剁戶緇繍琛?/p>

    緗戠粶搴撶紪鍐欓毦搴︼細綆鍗曪紝姣擟 socket鏇寸畝鍗?/p>

    絎笁鏂圭綉緇滃簱鍙婃鏋舵暟閲忥細鍋忓皯

     

    Skynet(lua+C)

    寮鍙戞晥鐜囷細鍩轟簬鍔ㄦ佽璦鐨勫紑鍙戝垵嬈″啓姣旇緝蹇紝鍚庢湡緇存姢鍜岄噸鏋勪細鑰楄垂涓瀹氱殑鏃墮棿鍦ㄦ煡閿欎笂

    榪愯鏁堢巼錛氬熀浜巐ua jit鐨勮繍琛屾晥鐜囪繕鏄兘鎺ュ彈鐨?/p>

    閮ㄧ講渚挎嵎鎬э細鏂逛究錛?鍙湁搴曞眰淇敼闇瑕侀噸鏂扮紪璇戯紝 澶ч儴鍒嗘椂闂村彧鐢ㄦ洿鏂發ua鏂囦歡

    璋冭瘯渚挎嵎鎬э細涓嶆槸寰堟柟渚匡紝鍩轟簬鏃ュ織鏂瑰紡榪涜鏌ラ敊

    涓婃墜搴︼細lua璇█鐗規ф湁閮ㄥ垎鍜孋緋昏璦鏈変竴瀹氬樊寮傦紝鍩轟簬Actor妯″瀷鐨勬濇兂瀛︿範錛岄傚簲闇瑕佽楄垂涓瀹氱殑鏃墮棿

    鐑洿鏂幫細綾諱技浜嶦rlang錛屽彲綺劇‘鍒板嚱鏁扮駭鐨勭儹鏇存柊

    Web瀵規帴錛氭湁涓浜沨ttp鏀寔錛岄氳繃紺懼尯鎱㈡參榪涜瀹屽杽

    宕╂簝澶勭悊錛歭ua澶╃敓鍙互鎹曡幏閿欒

    緗戠粶搴撶紪鍐欓毦搴︼細鑷甫錛屾棤闇緙栧啓

    絎笁鏂圭綉緇滃簱鍙婃鏋舵暟閲忥細閫氳繃紺懼尯鎱㈡參瀹屽杽

     

    C++

    寮鍙戞晥鐜囷細緙栬瘧鎱紝鏂囦歡澶氾紝閫氱敤搴撳皯

    榪愯鏁堢巼錛歯ative閫熷害鏍囨潌

    閮ㄧ講渚挎嵎鎬э細緙栧啓鍚勭被鐨刴ake闂ㄦ杈冮珮

    璋冭瘯渚挎嵎鎬э細鍙氳繃VisualStudio榪涜Windows騫沖彴璋冭瘯

    涓婃墜搴︼細2~3騫寸粡楠岀殑鐔熸墜浠嶇劧浼氬啓鍑哄穿婧冨拰娉勯湶浠g爜

    鐑洿鏂幫細鍙氳繃DLL榪涜

    Web瀵規帴錛氫唬鐮佸暟鍡︼紝絎笁鏂瑰簱灝?/p>

    宕╂簝澶勭悊錛歐indows涓嬪彲浣跨敤SEH鎹曡幏孌靛紓甯革紝鍏朵粬騫沖彴鍙兘閫氳繃宕╂簝鍚庤繘琛宑oredump鍒嗘瀽錛屽閿欓潪甯稿樊

    緗戠粶搴撶紪鍐欓毦搴︼細鍩轟簬asio緙栧啓杈冧負綆鍗曪紝浣嗘諱綋鐪嬫潵闅懼害涓嶄綆

    絎笁鏂圭綉緇滃簱鍙婃鏋舵暟閲忥細杈冨

     

    浠ヤ笅鏄緱鍒?/p>

    image

     

    浠庡彂鏂囨椂鐨勯」鐩榪欎簺璇█浣跨敤鐜囨潵璇達紝Java錛孍rlang錛孋++緙栧啓鐨勬湇鍔″櫒杈冨錛孏olang錛孞avaScript錛孋#鏄浜屾闃燂紝Skynet鐢變簬涓婃墜涓嶆槸寰堝鏄擄紝鎵浠ヤ粎鏈変袱浣嶆暟鐨勫洟闃熷湪浣跨敤錛屼絾鎬諱綋琛ㄧ幇榪樻槸姣旇緝鍑鴻壊鐨?

    瀵逛簬鑰佸洟闃燂紝 C++鐨勬湇鍔″櫒宸ュ叿閾懼拰妗嗘灦宸茬粡鐩稿鎴愮啛錛?瀹屽叏娌″繀瑕佹洿鎹㈡柊璇█錛?鍙槸鍦ㄥ鎺dk鎰熻鍥伴毦鏃訛紝鍙互灝濊瘯Golang榪欎簺瀵箇eb鏈変紭鍔跨殑璇█榪涜娣峰悎璇█寮鍙?

    瀵逛簬鏂板洟闃燂紝寮鍙戞晥鐜囷紝涓婃墜搴﹀拰閮ㄧ講鏁堢巼鏄紭鍏堥夋嫨鐨勶紝C#錛孏olang錛孞avaScript榪欎簺鏂板叴璇█浼氳浣犱簨鍗婂姛鍊?

    瀵逛簬澶ц妯℃棤闇閫夋湇鐨勬湇鍔″櫒錛?Skynet鐨刟ctor妯″瀷瀵規墿灞曚細姣旇緝瀹規槗

    瀵逛簬澶у叕鍙革紝濂介」鐩紝涓婄嚎鍚庨渶瑕侀氳繃鐑洿鏂拌繘琛宐ug淇ˉ鐨勶紝C#錛孋++錛孍rlang浼氭槸棣栭?

     

    浣嗘葷殑涓鐐癸紝 榪樻槸鏍規嵁鍥㈤槦鐔熸倝搴︽潵閫夋嫨璇█錛岃錘鐒剁殑浣跨敤鏂拌璦鐨勯闄╀篃鏄緢澶х殑

    ]]>
    寮婧怗olang娓告垙鏈嶅姟鍣ㄦ鏋禼ellnethttp://www.shnenglu.com/sunicdavy/archive/2015/10/16/212026.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Fri, 16 Oct 2015 03:44:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2015/10/16/212026.htmlhttp://www.shnenglu.com/sunicdavy/comments/212026.htmlhttp://www.shnenglu.com/sunicdavy/archive/2015/10/16/212026.html#Feedback6http://www.shnenglu.com/sunicdavy/comments/commentRss/212026.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/212026.html綆鍗?鏂逛究,楂樻晥鐨凣o璇█鐨勬父鎴忔湇鍔″櫒妗嗘灦

    func server() {
     
        pipe := cellnet.NewEventPipe()
     
        evq := socket.NewAcceptor(pipe).Start("127.0.0.1:7234")
     
        socket.RegisterSessionMessage(evq, coredef.TestEchoACK{}, func(content interface{}, ses cellnet.Session) {
            msg := content.(*coredef.TestEchoACK)
     
            log.Println("server recv:", msg.String())
     
            ses.Send(&coredef.TestEchoACK{
                Content: proto.String(msg.String()),
            })
     
        })
     
        pipe.Start()
     
    }
     
    func client() {
     
        pipe := cellnet.NewEventPipe()
     
        evq := socket.NewConnector(pipe).Start("127.0.0.1:7234")
     
        socket.RegisterSessionMessage(evq, coredef.TestEchoACK{}, func(content interface{}, ses cellnet.Session) {
            msg := content.(*coredef.TestEchoACK)
     
            log.Println("client recv:", msg.String())
     
        })
     
        socket.RegisterSessionMessage(evq, coredef.SessionConnected{}, func(content interface{}, ses cellnet.Session) {
     
            ses.Send(&coredef.TestEchoACK{
                Content: proto.String("hello"),
            })
     
        })
     
        pipe.Start()
    }

     

    欏圭洰鍦板潃: https://github.com/davyxu/cellnet



    ]]>
    Golang, Lua, C#闂寘鍙橀噺鎹曡幏宸紓http://www.shnenglu.com/sunicdavy/archive/2015/09/23/211895.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Wed, 23 Sep 2015 10:31:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2015/09/23/211895.htmlhttp://www.shnenglu.com/sunicdavy/comments/211895.htmlhttp://www.shnenglu.com/sunicdavy/archive/2015/09/23/211895.html#Feedback2http://www.shnenglu.com/sunicdavy/comments/commentRss/211895.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/211895.html鐪婥#渚嬪瓙

                Action[] a = new Action[3];
     
                for (int i = 0; i < 3; i++)
                {
                    a[i] = ( ) => { Console.WriteLine(i); };
                }
     
                for (int i = 0; i < 3; i++){
                    a[i]();
                }

    C#鎵撳嵃緇撴灉涓? 3 3

     

    Golang鐨勪緥瀛?/p>

        a := make([]func(), 3 )
        
        for i := 0; i < 3; i++ {
            
            a[i]= func( ){
                
                fmt.Println(i)
                
            }    
        
        }
        
        for _, s := range a {
            s()
        }

    Golang鎵撳嵃緇撴灉涓? 3 3

     

    鏈鍚庢槸Lua鐨勪緥瀛?/p>

    a = {}
     
    for i = 1, 3 do
     
        table.insert( a, function()
            print(i)
        end
        )
     
    end
     
     
    for _, v in ipairs(a) do
        v()
    end

    Lua鎵撳嵃緇撴灉涓? 2 3

     

    宸紓鍦ㄤ簬, C#鍜孏olang灝嗗彉閲忔崟鑾峰埌闂寘鍐呮椂, 鍧囦嬌鐢ㄥ紩鐢ㄦ柟寮? 鍗沖綋鏈鍚庡紑濮嬭皟鐢ㄤ嬌鐢ㄥ彉閲忔椂, 鐢變簬鍙橀噺宸茬粡緇撴潫寰幆, 鎵浠ユ槸鏈緇堝?/p>

    浣嗘槸Lua鎹曡幏鏂瑰紡鏄兼崟鑾? 鍥犳姣旇緝瀹規槗鐞嗚В, 鏄灝戝氨鏄灝?/p>

    ]]>
    瀵筭olang鏈嶅姟鍣ㄥ紑鍙戞ā寮忕殑涓浜涙濊?/title><link>http://www.shnenglu.com/sunicdavy/archive/2015/09/09/211784.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Wed, 09 Sep 2015 11:06:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2015/09/09/211784.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/211784.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2015/09/09/211784.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/211784.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/211784.html</trackback:ping><description><![CDATA[<h1>澶氱嚎紼?鍚屾闃誨妯″瀷</h1> <p>鍦ㄦ垜浠殑娓告垙欏圭洰涓嬌鐢ㄧ殑golang鏈嶅姟鍣ㄥ紑鍙戞柟寮忓涓?/p> <p>1.澶氱嚎紼嬮昏緫</p> <p>2.鍚屾闃誨. 涔熷氨鏄, 姣忎釜浜轟竴涓嚎紼?goroutine), io綰跨▼=閫昏緫綰跨▼</p> <p>榪欑鏂瑰紡鐨勪紭鐐?</p> <p>1. 鍚屾闃誨鏂瑰紡涓庝漢鐨勬濈淮鏂瑰紡綾誨悓</p> <p>2. 閫昏緫澶勭悊鎬ц兘鏈変竴瀹氭彁鍗?/p> <p>鍦ㄥぇ瑙勬ā浣跨敤榪欑妯″紡緙栧啓閫昏緫鍚? 鎴戜滑鍙戠幇浜嗚繖縐嶆ā寮忓彧鏈?涓己鐐? <strong>緙栧啓鑰呴渶瑕佸鐞嗗綰跨▼鍏崇郴</strong></p> <p>浣嗚繖鏈韓紜疄鐩存帴鑷村懡鐨? 鍥炴兂C++鏃朵唬, 澶氱嚎紼嬪鐞嗘椂, 璋冭瘯閲嶇幇鐨勫洶闅鋸?鑴戣ˉ鏅薄澶儴涓嶆暍鐩磋</p> <h1>鍗曠嚎紼?寮傛澶氳繘紼嬫ā鍨?/h1> <p>鍦–++鏃朵唬, 鎴戞浘緇忕紪鍐欒繃涓濂梐sio鐨凜++鏈嶅姟鍣ㄦ鏋? 閲囩敤io澶氱嚎紼? 閫昏緫鍗曠嚎紼? 渚濊禆鐫C++楂樻ц兘鐨勪紭鍔? 璁╁紑鍙戜究鎹風畝鍗曚笖鏃犻渶鍏沖績綰跨▼闂.</p> <p>閭d箞鍒頒簡golang鏃朵唬, 涓轟粈涔堜笉鑳借瘯涓嬪崟綰跨▼寮傛澶氳繘紼嬫柟寮忔潵緙栧啓閫昏緫?</p> <p>涓庡綰跨▼鍚屾闃誨瀵規瘮鍚? 鎴戜滑鍙戠幇, 涓よ呬紭緙虹偣浜掕ˉ. 閭h繖灝卞洖鍒頒簡棰嗗煙閫夊瀷闂浜? 瀵逛簬娓告垙鏈嶅姟鍣ㄩ渶瑕佺殑涓婃墜綆鍗? 寮鍙戜究鎹? 鍘嬪姏闄嶄綆(闈濵MO)榪欎簺鐗圭偣鏉ヨ, 鍗曠嚎紼嬪紓姝ュ榪涚▼鍐嶅悎閫備笉榪囦簡</p> <p>閭d箞, 鎴戜滑鍦ㄧ敤golang緙栧啓鍗曠嚎紼嬪紓姝ュ榪涚▼鏈嶅姟鍣ㄥ簲璇ユ敞鎰忓摢浜涚偣鍛?</p> <p>1. socket澶勭悊瀹屽叏灝佽, 鍙氳繃channel鎶涘嚭鍒伴昏緫綰跨▼鎺掗槦澶勭悊</p> <p>2. 鏁版嵁搴? rpc鍙婂叾浠杋o澶勭悊, 涓寰嬫敼涓哄紓姝ュ洖璋冩ā寮? 涓嶄嬌鐢ㄥ悓姝ユ帴鍙?/p> <p>3. 鐜╁瀛樼洏鎻愪氦鏁版嵁鍙互鑰冭檻澶嶅埗騫舵彁浜ゅ埌瀛樼洏綰跨▼鏂瑰紡, 鎻愰珮鎬ц兘. </p> <p>4. 閲囩敤澶氳繘紼嬫灦鏋? 姣斿璁劇綉鍏寵繘紼? 鎶奿o鍘嬪姏鍒嗘暎鍒拌繘紼嬩腑</p> <p>5. 閫昏緫緙栧啓涓? 涓嶅厑璁鎬嬌鐢╣o寮綰跨▼鍙奵hannel, 鏈夐渶瑕佹彁楂樻ц兘閮ㄥ垎闇瑕佸崟鐙紪鍐?/p> <p> </p> <h1>Actor妯″瀷鐨勭棝</h1> <p>cellnet鍦ㄥ紑鍙戞椂鏈潵鑰冭檻浣跨敤actor妯″瀷鏉ヨ繘涓姝ョ畝鍖栧綰跨▼閫昏緫鐨勯夯鐑? 緇忓巻浜嗕竴孌墊椂闂寸殑鍘熷瀷寮鍙戝悗, 鍙戠幇浜嗕竴浜涢棶棰? 鍒椾婦濡備笅:</p> <p>1. golang鐨勫己綾誨瀷涓嶉傚悎actor妯″瀷榪欑緇忓父闇瑕佸姩鎬佺敓鎴愬悇綾繪秷鎭殑妯″瀷, 浣唖kynet(C+lua)/erlang灝辨湁澶╃敓浼樺娍</p> <p>2. actor妯″瀷鏈韓涓嶆槸涓囪兘鐨? 涓嶈兘瑙e喅鎵鏈夐渶姹? 鐗瑰埆鏄父鎴?/p> <p>3. actor妯″瀷鐞嗚В鍒板簲鐢ㄦ湁涓瀹氱殑闅懼害. 鏈韓榪橀渶瑕佹惌寤烘鏋? 涓婃墜澶嶆潅</p> <p>鎬諱箣, 鐪嬭繃涓浜沞rlang鍙妔kynet鐨勭敤渚? 娌℃湁搴旂敤鐨勫緢綰涓旀垚鐔熺殑鎴愬姛actor妯″瀷妗堜緥, 浠庝紶緇焥ocket鏈嶅姟鍣ㄦ鏋惰法瓚婂埌actor妯″瀷浼氭壇鍒拌泲, 鍥犳, 鍚庢湡cellnet浼氳冭檻鍥炲綊鍒版垚鐔熺殑socket鏈嶅姟鍣ㄦ鏋? 鎶婃灦鏋勫仛鍒扮畝鍗曚笂鎵? 楂樻墿灞曚笂.</p><img src ="http://www.shnenglu.com/sunicdavy/aggbug/211784.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2015-09-09 19:06 <a href="http://www.shnenglu.com/sunicdavy/archive/2015/09/09/211784.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>澶ф湇鍔″櫒鏋舵瀯璁ㄨhttp://www.shnenglu.com/sunicdavy/archive/2015/07/21/211321.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Tue, 21 Jul 2015 02:30:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2015/07/21/211321.htmlhttp://www.shnenglu.com/sunicdavy/comments/211321.htmlhttp://www.shnenglu.com/sunicdavy/archive/2015/07/21/211321.html#Feedback8http://www.shnenglu.com/sunicdavy/comments/commentRss/211321.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/211321.html鏈榪戝弬鍔犱簡涓涓ぇ鏈嶅姟鍣ㄦ灦鏋勮璁烘椿鍔? 璁板綍涓嬪績寰?

    姒傝堪

    娓告垙瀹㈡埛绔噰鐢–ocos2dx-Lua鐨勭函Lua緙栧啓閫昏緫, 鏈嶅姟鍣ㄩ噰鐢℅olang浣滀負寮鍙戣璦

    娓告垙綾誨瀷綾諱技浜嶤OC,鍥犳鏃犻渶閫夋湇. 闇瑕佷嬌鐢ㄥぇ鏈嶅姟鍣ㄦ灦鏋勮繘琛屽鐞?

    鏁版嵁搴?/b>

    閲囩敤Mongodb鍋氭寔涔呭瓨鍌? redis鍋氳法鏈嶉氫俊鏁版嵁浜ゆ崲

    浣跨敤UCloud鐨勪簯鎶鏈? 鐪佸幓浜嗙儲浜虹殑榪愮淮宸ヤ綔

    閫氫俊鍙婂崗璁?/b>

    瀹㈡埛绔拰鏈嶅姟鍣ㄩ氳浣跨敤HTTP鐭繛鎺? 鍩轟簬json鐨勬暟鎹皝鍖呭崗璁?

    鏈嶅姟鍣ㄩ棿澶ч噺浣跨敤Golang鑷甫鐨刯son+rpc榪涜閫氫俊

    鏈嶅姟鍣ㄧ被鍨?/b>

    鏈嶅姟鍣ㄧ被鍨嬪ぇ鑷村垎涓洪昏緫鏈嶅姟鍣?鎴樻枟鏈嶅姟鍣? 涓績鏈嶅姟鍣?

    閫昏緫鏈嶅姟鍣?/b>

    閫昏緫鏈嶅姟鍣ㄨ礋璐f棩甯擱昏緫鍙婂叕鍏遍昏緫澶勭悊(濂藉弸, 鍏細)

    1涓昏緫鏈嶅姟鍣ㄥ搴斾竴涓尯, n涓尯鍧囦嬌鐢║cloud浜慚ongodb榪涜鏁版嵁瀛樺偍

    鎴樻枟鏈嶅姟鍣?/b>

    鎴樻枟鏈嶅姟鍣ㄦ槸涓涓泦緹? 闆嗙兢浼氳繑鍥炰竴涓礋杞芥渶浣庣殑鏈嶅姟鍣ㄨ繑鍥炰嬌鐢?

    鎴樻枟鏈嶅姟鍣ㄩ氳繃cgo鎶鏈笌瀹㈡埛绔疌++/lua鐨勬垬鏂楅昏緫榪涜閫昏緫澶嶇敤, 鍦ㄦ鎶鏈笂榪涜

    鎴樻枟閫昏緫鐨勬牎楠?

    涓績鏈嶅姟鍣?/b>

    瀹㈡埛绔櫥闄嗗墠, 鍦ㄤ腑蹇冩湇鍔″櫒榪欓噷鑾峰緱鍙櫥闄嗙殑閫昏緫鏈嶅姟鍣ㄥ湴鍧, 鍚屾椂鍋氫竴涓礋杞藉潎琛?

    鐭繛鎺?

    璇勪環

    鐢變簬鎿嶄綔緋葷粺鐨勬妧鏈秼浜庣ǔ瀹? 鍚屾椂, 鎵嬫父鐨勫急浜や簰鍨嬪鑷寸殑娓告垙鏋舵瀯瓚嬩簬綆鍗? 鍥犳緗戠粶璐熻澆涓嶅啀鏄父鎴忔湇鍔″櫒鎶鏈殑鐡墮. 浠庣粡楠岀湅鏉? 娓告垙鏈嶅姟鍣ㄦ妧鏈? 鏇撮噸瑕佺殑鏄繕鏄湅鏁版嵁搴撶殑閫夊瀷鍙婂鐞嗘柟寮? 

    铏界劧Mongodb鐨勬ц兘涓婁笉濡傚唴瀛樻暟鎹簱. 浣嗘槸浠庡瓨鍌ㄥ畨鍏ㄦт笂瑕佹瘮涓漢鎼緩鐨勫唴瀛樻暟鎹簱綆鍗? 瀹夊叏

    澶栧姞涓婁簯鎶鏈殑寮曠敤, 鎬ц兘鐨勭摱棰堝拰榪愮淮鐨勬妧鏈鏉傚害榪庡垉鑰岃В

    Redis鐢ㄤ簬璺ㄦ湇鏁版嵁浜や簰閭f槸鍐嶅ソ涓嶈繃鐨勬暟鎹腑浠嬩簡, 淇濊瘉閫熷害鍜岀ǔ瀹氭? 緇濆涓嶆槸閫犺疆瀛愯兘姣旀嫙鐨?

    鐭繛鎺ュ湪鎵嬫父涓婂鐞嗚搗鏉ユ瘮闀胯繛鎺ョ畝鍗曚竴浜? 鏃犻渶鍋氭柇綰塊噸榪? 鏈嶅姟鍣ㄧ殑搴曞眰涔熸槸鐢盙olang鐨勬鏋跺簱淇濊瘉璐ㄩ噺鐨? 鍥犳璐熻澆姣棤闂. 鏈嶅姟鍣ㄥ鍐呭強瀵瑰鍧囦嬌鐢╦son榪涜鏁版嵁浜ゆ崲, 綆鍖栦簡鍗忚澶勭悊. 涔熸柟渚夸簡璋冭瘯

    json rpc鐨勬ц兘鎹熻楀浜庢暣涓昏緫鐨勫鐞嗘潵璇村潎鍙互蹇界暐涓嶈



    ]]>
    鎴戠殑Golang鍏ㄦ帴瑙?/title><link>http://www.shnenglu.com/sunicdavy/archive/2015/06/04/210823.html</link><dc:creator>鎴橀瓊灝忕瓚</dc:creator><author>鎴橀瓊灝忕瓚</author><pubDate>Thu, 04 Jun 2015 09:19:00 GMT</pubDate><guid>http://www.shnenglu.com/sunicdavy/archive/2015/06/04/210823.html</guid><wfw:comment>http://www.shnenglu.com/sunicdavy/comments/210823.html</wfw:comment><comments>http://www.shnenglu.com/sunicdavy/archive/2015/06/04/210823.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/sunicdavy/comments/commentRss/210823.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/sunicdavy/services/trackbacks/210823.html</trackback:ping><description><![CDATA[<p>婊℃墦婊$畻, 浠庡ソ鍙嬫帹鑽怗olang鑷沖彂鏂囨椂, 浣跨敤Golang宸茬粡鏈?騫村浜? 榪欑鏃墮棿瀵逛簬C/C++ Java榪欎簺鑰佽呮潵璇? 綆鐩存槸鑿滈笩綰у埆鐨勭粡楠?/p> <p>浣嗕綔涓烘柊鐢熶唬璇█鐨勭壒鐐瑰氨鏄疄鎴? Golang榪欎竴騫撮噷, 宸茬粡涓洪」鐩彁渚涗簡紼沖畾鐨勬湇鍔″櫒鍜屽己澶х殑鎵╁睍鑳藉姏, 涓庡鎴風鐨刄nity3D閲岀殑C#涓鏍? 閮芥槸寮哄ぇ, 鏋佽嚧寮鍙戞晥鐜囦唬琛ㄧ殑浼樼寮鍙戣璦.</p> <h2>鐢ㄩ旂瘒</h2> <p>Golang鍒板簳鎷挎潵鍋氬暐? 鎴戦渶瑕佷箞?</p> <p> 楂樻晥(鎬ц兘,寮鍙?鐨勬湇鍔″櫒璇█. 鍖呮嫭Web, 娓告垙, App</p> <p>緙栧啓妗岄潰綰I鏆備笉鏄緢閫傚悎</p> <p>鎴戦渶瑕佹妸鐜板湪鐨凜++, Python, Erlang絳夋湇鍔″櫒鏀規垚Golang涔?</p> <p>鎬ц兘鏈夌摱棰? 寮鍙戞晥鐜囦綆, 鏈夐挶鏈夋椂闂寸殑璇? 瀹屽叏鍙互</p> <p> </p> <h2>璇勪環綃?/h2> <p>鍚繃澶鐨勪漢瀵笹olang鐨勮瘎浠? 澶ф鍒嗕負榪欎箞鍑犵被: </p> <h3>C/C++鎬ц兘鍏?/h3> <p>姝ょ被鍏氬憳瀵逛換浣曚簨鐗╅兘榪芥眰鏋佽嚧鐨?鎬ц兘. 榪樺ソGolang鏄洿鎺ョ敓鎴恘ative code, 鍚﹀垯浼氳鎵圭殑浣撴棤瀹岃偆. 浣嗘槸鐢變簬Golang搴曞眰涓哄茍鍙戝拰寮鍙戞晥鐜囪屽仛鍑虹殑涓浜涚郴緇? 綾諱技浜嶨C, 璋冨害鍣ㄥ拰鍒嗛厤鍣ㄧ瓑, 浼氬湪璇█灞備笂鎹熷け寰堝鎬ц兘. 鍥犳C/C++鍏氳繕鏄湁鐞嗙敱鎵笹olang鎬ц兘浣庝笅</p> <h3>Erlang騫跺彂鍏?/h3> <p>浣滀負鐢典俊綰у厓鑰? Erlang鐨勬ā鍨嬪拰鏋舵瀯褰撲箣鏃犳劎, OTP鎵╁睍鎬ц秴綰у己. 瀹岀編鐨凙ctor妯″瀷涔熻閫昏緫緙栧啓姣擮O鏇村姞鐩磋</p> <p>CSP涓嶢ctor鍖哄埆浠呬粎鍙槸鍦╟hannel鐨勫綊灞炶寖鍥磋屽凡, 浣嗚繖鐐圭粏寰樊鍒嵈瀵逛袱縐嶈璦鐨勫紑鍙戝彉鐨勮駿鐒朵笉鍚?/p> <p>Golang鍦ㄥ茍鍙戞ā鍨嬩笂閫夋嫨浜咰SP, 灝辨槸鑰冭檻鎶婃灦鏋勭殑璁捐鐣欑粰浣跨敤鑰? 鍍廋#涓鏍峰緩绔嬩竴涓被搴撶殑涓栫晫, 鑰屼笉鏄疢FC涓鏍風殑妗嗘灦涓栫晫. 璁╁紑鍙戞洿鑷敱</p> <p>Erlang鐨凙ctor涔熸病閿? 璁╁紑鍙戞洿鐩磋, 璁╁穿婧冩彁鍓嶆潵鍒? 灝藉揩澶勭悊</p> <h3>Rust鍏?/h3> <p>Rust鍦ㄥ彂鏂囨椂宸茬粡鍙戝竷浜?.0. 榪欒R綺夊叴濂嬬殑絀挎浜庡悇澶ф妧鏈鍧涘拰璁ㄨ緹?/p> <p>浣哛ust鐨勭悊蹇靛湪鎴戠湅鏉ユ湁鐐瑰亸鎵т簡, 涓瀹氳鎶婂悇縐嶉敊璇湪緙栬瘧鏈熸毚闇插嚭鏉? 鎵浠ラ犲嚭浜嗗緢澶氫笉闇瑕佺殑綾誨瀷鍜屾蹇? 榪炶璦閮芥瘮C璇█鏇寸鍙瘋瘽</p> <p>澶х櫧璇濊鏉? 鏈夌偣緙栫▼緇忛獙鐨勪漢鐪嬪埌JavaScript瀹屽叏鐪嬪緱鎳? 浣嗙湅Rust鍗村儚澶╀功</p> <p>瀵規瘮鍚屾椂鏈熺殑TypeScript, Dart, Swift. Rust灝辨槸鏈夌偣閭d箞鐙緹韞婂緞</p> <p>璇ュ厷鍏氬憳緇忓父鎬х殑鐢ㄥ悇縐嶇壒鎬у姣擥olang, 榪芥眰鍗曠壒鎬х殑浼樼. </p> <p>浣嗗叾瀹? Golang鏈韓鏄竴闂ㄥ畬鏁村摬瀛? 寰堝璇█鐗規т簰鐩鎬箣闂存湁鍏寵仈. 鏈夎璁′笉褰撶殑鍦版柟, 褰撶劧鏇村鐨勬槸瀹屾暣浣撶郴. 涓嶆眰鍜屽叾浠栬璦姣?/p> <p>鍙拷姹傝В鍐抽棶棰樼殑閫熷害</p> <h3>鑷畾涔夊厷</h3> <p>浜戦鐪嬭繃Golang鍚? 鍥犱負璇ヨ璦鏈韓灝辨槸寮哄寲鐗堢殑C, 鍥犳棰囧彈浜戦鍠滄. 浣嗗湪涓鍫嗚瘎浠峰悗, 浜戦榪樻槸鏋滄柇閫夋嫨浜咰+lua鐨勭粍鍚堝啓鍑虹殑Skynet</p> <p>铏界劧涓嶇煡閬撳師鍥? 浣嗘垜鐚滅殑璇? 姣曠珶鏄璇█鏈韓鐨勫彲鎺фц繕涓嶉偅涔堢湅濂?/p> <p>鍚屾椂, 鎴戜滑鍙戠幇Skynet浣跨敤鐨勬槸Actor妯″瀷, 涔熷彂鐜板ぇ紲炵駭鐨勭▼搴忓憳灝辨槸鏈夊厛瑙? </p> <p><font style="background-color: #ffffff" color="#ffffff">杞澆璇鋒敞鏄? 鎴橀瓊灝忕瓚</font><a title="http://www.shnenglu.com/sunicdavy" href="http://www.shnenglu.com/sunicdavy"><font style="background-color: #ffffff" color="#ffffff">http://www.shnenglu.com/sunicdavy</font></a></p> <h2>鎰熻Е綃?/h2> <p><strong>璁捐</strong></p> <p>韙忓叆Golang, 灝變笉瑕佸皾璇曡璁℃ā寮?/p> <p>浼犵粺鐨凮O鍦ㄨ繖閲屾槸闈炴硶鐨? 灝濊瘯妯℃嫙鍙槸涓縐嶆悶絎?/p> <p>鎶奜O鍦℅olang閲屾崲鎴愬鍚?鎺ュ彛</p> <p>瀵瑰疄鐜拌呮潵璇? 鎶婂悇縐嶇粨鏋勯兘澶嶅悎璧鋒潵, 瀵瑰鏆撮湶鍑轟竴涓垨澶氫釜鎺ュ彛, 鎺ュ彛灝卞ソ鍍忎嬌鐢ㄨ呭湪瀹炵幇妯″瀷涓婃墦鍑虹殑寰堝媧?/p> <p>鍒曞叏灞鍑芥暟, 鍖?Package)鍙互鎺у埗鍏ㄥ眬鍑芥暟浣跨敤鑼冨洿. </p> <p>娌″繀瑕佷粈涔堥兘鐢╥nterface瀵瑰灝佽, struct涔熸槸涓縐嶈壇濂界殑灝佽鏂規硶</p> <p>Golang鏃犵戶鎵? 鍥犳鏃犻渶綾繪淳鐢熷浘. 娌℃湁媧劇敓榪欑鐐瑰鐐圭殑渚濊禆, 鍥犳涓嶄細鍦ㄥぇ閲忕被鍏崇郴鍒版潵鏃? 褰㈡垚綣佹潅涓嶅彲鍙樺寲鐨勬爲褰㈢粨鏋?/p> <p> </p> <p><strong>瀹瑰櫒</strong></p> <p>鐢ㄤ簡寰堥暱鏃墮棿map, 鎵嶅彂鐜癎olang鎶妋ap鍐呭緩涓鴻璦鐗規ф椂, 宸茬粡鍘繪帀浜嗗緗瀷map鐨刟pi鐗規? 涓鍒囩殑璁塊棶鍜岃幏鍙栭兘鏄寜鐓ц璦鐗規ф潵鍋氱殑, 鍘熷瓙鍖?/p> <p>鏁扮粍鍙互鐞嗚В涓哄簳灞傚璞? 浣犲鉤鏃剁敤鐨勯兘鏄垏鐗? 涓嶆槸鏁扮粍, 鍒囩墖灝辨槸鎸囬拡, 鎸囧悜鏁扮粍. 鍒囩墖鏄交閲忕殑, 鍗充究鍊兼嫹璐濅篃鏄綆鎹熻楃殑</p> <p> </p> <p><strong>鍐呭瓨</strong></p> <p>Golang鍦ㄥ疄闄呰繍琛屼腑, 浣犱細鍙戠幇鍐呭瓨鍙兘浼氱柉娑? 浣嗚窇涓婁竴孌墊椂闂村悗, 灝變繚鎸佺ǔ瀹? 榪欏拰Golang鐨勫唴瀛樺垎閰? 鍨冨溇鍥炴敹鏈変竴瀹氱殑鍏崇郴</p> <p>鐜頒唬鐨勭紪紼嬭璦鐨勫唴瀛樼鐞嗕笉浼氬緢綺楁毚鐨勭洿鎺ヤ粠OS閭h竟鍒嗛厤寰堝鍐呭瓨. 鑰屾槸鎸夐渶鐨勪笉鏂垎閰嶆垚鍧楃殑鍐呭瓨. </p> <p>瀵逛簬闈炴搗閲忕駭搴旂敤, Golang鏈韓鐨勫唴瀛樻ā鍨嬪畬鍏ㄥ彲浠ユ拺寰椾笅鏉? 鏃犻渶鍍廋++涓鏍? 姣忎釜宸ョ▼蹇呭仛鍐呭瓨姹犲拰綰跨▼姹?/p> <p><strong>Channel</strong></p> <p>Channel鍜岄攣璋佽交閲? 涓鍙ヨ瘽鍛婅瘔浣? Channel鏈韓鐢ㄩ攣瀹炵幇鐨? 鍥犳鍦ㄨ揩涓嶅緱宸叉椂, 榪樻槸灝介噺鍑忓皯浣跨敤Channel, 浣咰hannel灞炰簬璇█灞傛敮鎸? 閫傚害浣跨敤, 鍙互鏀瑰杽浠g爜鍙鍐?/p> <p><font style="background-color: #ffffff" color="#ffffff">杞澆璇鋒敞鏄? 鎴橀瓊灝忕瓚</font><a title="http://www.shnenglu.com/sunicdavy" href="http://www.shnenglu.com/sunicdavy"><font style="background-color: #ffffff" color="#ffffff">http://www.shnenglu.com/sunicdavy</font></a></p> <p><strong>閿欒</strong></p> <p>瑙夊緱Golang涓嶅仠鐨勫鐞唀rr? 閭f槸鍥犱負騫蟲椂鍦ㄥ叾浠栬璦鏍規湰娌″鐞嗚繃閿欒, 瑕佷笉鐒跺氨鏄牴閮ㄤ竴嬈℃ry榪囨墍鏈夌殑寮傚父, 榪欐槸涓縐嶅嵄闄╃殑琛屼負</p> <p>panic鍙互琚崟鑾? 鍥犳緙栧啓鏈嶅姟鍣ㄦ椂, 鍙互鍋氬埌涓嶆寕</p> <p> </p> <p><strong>鍗遍櫓鐨刬nterface{}</strong></p> <p>榪欎笢瑗垮氨璺烠/C++閲岀殑void*涓鏍風殑鍗遍櫓, nil琚玦nterface{}鍖呰9鍚庝笉浼氱瓑浜巒il鐩哥瓑, 浣唒rint鍑烘潵紜疄鏄痭il</p> <p>妯℃澘浼拌鍙互瑙e喅瀹瑰櫒鍐呭甫interface{}鐨勯棶棰? 浣嗘柊涓滆タ寮曞叆, 浼拌鍙堜細璁╃幇鍦ㄧ殑鍝插涓浜涘噷涔?/p> <p> </p> <p><font style="background-color: #ffffff" color="#ffffff">杞澆璇鋒敞鏄? 鎴橀瓊灝忕瓚</font><a title="http://www.shnenglu.com/sunicdavy" href="http://www.shnenglu.com/sunicdavy"><font style="background-color: #ffffff" color="#ffffff">http://www.shnenglu.com/sunicdavy</font></a></p> <p> </p> <h2><strong>鍒濆Tips</strong></h2> <p>璇█瀛︿範鎸夌収瀹樼綉鐨勬暀瀛﹁蛋, 璺戝畬鍩烘湰灝變細浜?/p> <p>涓嬭澆涓涓狶iteIDE, 閰嶅悎Golang鐨凴untime,鍩烘湰寮鐜灝辨湁浜?/p> <p>Golang鐨勭被搴撹璁℃柟寮忓拰C#/C++閮戒笉鍚? 濡傛灉鏈塒ython緇忛獙鐨勪細鎰熻姣棤榪濆拰鎰?/p> <p>鏈変竴涓囦釜鐞嗙敱閫犺疆瀛愰兘璇蜂綇鎵? 綾誨簱閲屾湁浣犺鐨勪笢瑗?/p> <p>鍐欏ぇ宸ョ▼璇鋒悳绱? <a name="688">Golang欏圭洰鐩綍緇撴瀯緇勭粐</a></p> <p>Golang璇█鏈韓鏈漢娌℃湁鍙戠幇bug, 鍗充究鏈変篃鏃╁氨琚ぇ紲炰滑鎹変綇浜? 鍞竴鐨勪竴涓劅瑙夎矊浼糱ug鐨? 緇忓父鏄粨鏋勪綋鎴愬憳棣栧瓧姣嶅皬鍐? 浣嗘槸json鍙堟棤娉曞簭鍒楀寲鍑烘潵鈥?/p> <p> <p><a name="688">鎱庣敤cgo. 瀹樻柟宸茬粡澹版槑鏈潵瀵筩go涓嶆彁渚涘畬鏁村吋瀹規? 浠諱綍涓闂ㄨ璦鍦ㄦ棭鏈熼兘闇瑕佸C鍋氬嚭鏀寔, 浣嗗悗鏈熷畬鍠勫悗鐨勪笉鍏煎閮芥槸甯告?/a></p> <p> </p> <p><font style="background-color: #ffffff" color="#ffffff">杞澆璇鋒敞鏄? 鎴橀瓊灝忕瓚</font><a title="http://www.shnenglu.com/sunicdavy" href="http://www.shnenglu.com/sunicdavy"><font style="background-color: #ffffff" color="#ffffff">http://www.shnenglu.com/sunicdavy</font></a></p> <p> </p> <p><a name="688"> </p></a><img src ="http://www.shnenglu.com/sunicdavy/aggbug/210823.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/sunicdavy/" target="_blank">鎴橀瓊灝忕瓚</a> 2015-06-04 17:19 <a href="http://www.shnenglu.com/sunicdavy/archive/2015/06/04/210823.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>golang鐨則ime.Format鐨勫潙http://www.shnenglu.com/sunicdavy/archive/2015/03/26/210173.html鎴橀瓊灝忕瓚鎴橀瓊灝忕瓚Thu, 26 Mar 2015 09:23:00 GMThttp://www.shnenglu.com/sunicdavy/archive/2015/03/26/210173.htmlhttp://www.shnenglu.com/sunicdavy/comments/210173.htmlhttp://www.shnenglu.com/sunicdavy/archive/2015/03/26/210173.html#Feedback1http://www.shnenglu.com/sunicdavy/comments/commentRss/210173.htmlhttp://www.shnenglu.com/sunicdavy/services/trackbacks/210173.htmlgolang鐨則ime.Format璁捐鐨勫拰鍏朵粬璇█閮戒笉涓鏍? 鍏朵粬璇█鎬繪槸浣跨敤涓浜涙牸寮忓寲瀛楃榪涜鏍囩ず, 鑰実olang鍛? 鏌ヤ簡緗戜笂涓浜涘潙渚嬪瓙 鑷繁鏌ヤ簡涓媑olang鐨勬簮鐮? 鍙戠幇浠ヤ笅浠g爜
    // String returns the time formatted using the format string
    //  "2006-01-02 15:04:05.999999999 -0700 MST"
    func (t Time) String() string {
        return t.Format("2006-01-02 15:04:05.999999999 -0700 MST")
    }
    

    灝濊瘯灝?006-01-02 15:04:05鍐欏叆鍒拌嚜宸辯殑渚嬪瓙涓?pre>func nowTime() string { return time.Now().Format("2006-01-02 15:04:05") }

    緇撴灉榪斿洖姝g‘. 璇㈤棶浜嗕笅, 鎹榪欎釜鏃ユ湡鏄痝olang璇炵敓鐨勬棩瀛愨?鍜嬮偅涔堣嚜鎭嬪憿鈥?

    ]]>
    青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
      <noscript id="pjuwb"></noscript>
            <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
              <dd id="pjuwb"></dd>
              <abbr id="pjuwb"></abbr>
              麻豆精品视频| 亚洲精品视频一区| 欧美一区激情| 黑丝一区二区三区| 欧美高清免费| 欧美精品久久久久久久免费观看| 亚洲精品视频在线观看免费| 亚洲激情一区| 欧美色精品天天在线观看视频| 亚洲一区二区三区视频| 亚洲专区一区| 在线日韩中文| 亚洲伦理在线| 国产在线视频欧美一区二区三区| 久久综合给合| 欧美日韩国产在线看| 先锋资源久久| 美女诱惑黄网站一区| 亚洲在线视频网站| 久久久国产亚洲精品| 一区二区三区导航| 久久av老司机精品网站导航| 亚洲另类视频| 欧美在线日韩在线| 夜夜精品视频| 久久亚洲国产精品一区二区| 亚洲特级片在线| 久久久久高清| 性欧美办公室18xxxxhd| 欧美黄色免费网站| 久久嫩草精品久久久精品一| 欧美日韩在线观看一区二区| 久久亚洲一区二区| 欧美视频免费在线| 欧美福利视频一区| 国产欧美韩日| 一本色道久久综合亚洲精品高清| 在线精品亚洲| 销魂美女一区二区三区视频在线| 亚洲精品乱码久久久久久蜜桃麻豆| 亚洲综合色自拍一区| 一区二区日韩精品| 欧美成人亚洲成人| 久久欧美中文字幕| 国产欧美午夜| 亚洲一区二区在线观看视频| 日韩一区二区精品视频| 久久伊人免费视频| 久久亚洲精品一区二区| 国产欧美日韩综合一区在线播放| 亚洲精品日产精品乱码不卡| 亚洲国产精品va在线观看黑人| 欧美一区二区三区日韩| 西西裸体人体做爰大胆久久久| 欧美日韩一卡二卡| 亚洲精品在线免费观看视频| 亚洲人成绝费网站色www| 久久精品五月| 麻豆av一区二区三区| 精品999在线播放| 久久久xxx| 欧美成人黄色小视频| 韩国在线视频一区| 久久久99久久精品女同性| 国产精品嫩草99av在线| 亚洲已满18点击进入久久| 午夜天堂精品久久久久| 国产精品一区二区视频| 亚洲尤物视频在线| 欧美一级大片在线观看| 国产综合欧美在线看| 久久久久久久性| 亚洲大胆在线| a91a精品视频在线观看| 欧美久久影院| 亚洲一区二区精品| 久久精品中文字幕免费mv| 尤物在线精品| 欧美激情一区在线观看| 国产精品99久久不卡二区| 欧美一区二区黄| 一区二区三区在线免费播放| 鲁大师成人一区二区三区| 亚洲狠狠婷婷| 亚洲女优在线| 一区二区三区在线免费观看 | 亚洲欧美成人| 韩国av一区二区三区在线观看| 久久五月天婷婷| 99精品视频一区| 久久久www免费人成黑人精品| 亚洲成色777777在线观看影院| 欧美日韩国产成人在线| 亚洲免费在线观看视频| 裸体一区二区三区| 亚洲网址在线| 亚洲电影第三页| 欧美三级在线视频| 久久久久久久久一区二区| av不卡在线看| 免费成人高清| 亚洲欧美另类国产| 亚洲人成在线观看一区二区| 国产精品久久久久免费a∨| 久久亚洲影音av资源网| 亚洲伊人第一页| 91久久久久| 久久综合狠狠综合久久综青草 | 亚洲作爱视频| 有坂深雪在线一区| 国产精品自拍网站| 欧美人与禽猛交乱配| 久久爱www久久做| 一区二区三区不卡视频在线观看| 麻豆九一精品爱看视频在线观看免费| 亚洲深夜福利视频| 亚洲精品色图| 在线视频观看日韩| 国产亚洲视频在线| 国产精品久久久久毛片大屁完整版 | 国产亚洲激情在线| 欧美日韩亚洲系列| 欧美承认网站| 麻豆免费精品视频| 久久精品视频免费观看| 亚洲欧美日本精品| 亚洲综合久久久久| 性欧美大战久久久久久久免费观看| 亚洲高清免费| 激情小说另类小说亚洲欧美| 国产精品爽黄69| 国产精品日产欧美久久久久| 欧美三级不卡| 欧美三级日本三级少妇99| 欧美高清视频| 欧美国产欧美亚洲国产日韩mv天天看完整| 香蕉成人啪国产精品视频综合网| 中文日韩在线| 亚洲一区三区电影在线观看| 一区二区三区精品视频在线观看| 亚洲精品在线一区二区| 亚洲人成毛片在线播放| 亚洲日本久久| 日韩图片一区| 亚洲特级毛片| 午夜视频一区| 欧美在线电影| 美日韩精品免费观看视频| 麻豆精品网站| 欧美高清在线精品一区| 欧美日韩国产小视频在线观看| 欧美日韩精品一区二区在线播放 | 欧美高清在线视频观看不卡| 亚洲国产美女久久久久| 亚洲精品欧美| 日韩亚洲欧美一区二区三区| av成人黄色| 久久aⅴ乱码一区二区三区| 久久久噜噜噜久久| 欧美另类一区| 国产精品视频专区| 亚洲国产成人精品女人久久久 | 亚洲最快最全在线视频| 亚洲自拍偷拍福利| 久久久免费精品视频| 欧美—级a级欧美特级ar全黄| 欧美日韩精品免费观看视一区二区 | 亚洲日本欧美日韩高观看| 一区二区三区日韩在线观看 | 亚洲综合首页| 美女日韩欧美| 日韩午夜剧场| 欧美在线免费观看视频| 欧美成人资源网| 国产视频一区在线观看一区免费| 亚洲第一久久影院| 国产精品99久久99久久久二8| 欧美资源在线| 日韩视频中文| 久久视频在线看| 国产精品女同互慰在线看| 亚洲电影在线观看| 欧美一区二区三区精品| 亚洲福利在线看| 欧美一级片在线播放| 欧美日韩一区综合| 一区三区视频| 欧美一区二区三区视频免费| 亚洲福利视频一区| 羞羞色国产精品| 欧美日韩免费| 亚洲在线视频观看| 老鸭窝毛片一区二区三区| 国产精品国产三级国产aⅴ无密码| 一色屋精品视频在线观看网站| 亚洲无毛电影| 亚洲欧洲精品一区二区精品久久久| 亚洲男女自偷自拍图片另类| 欧美精品在线极品| 亚洲欧洲日本专区|