CodeReviewComments ãã Go ã³ã¼ãã®ã¬ãã¥ã¼æã«ãããããã³ã¡ã³ãã«ã¤ãã¦ã gofmt gofmt ã¾ãã¯ãã®ã¹ã¼ãã¼ã»ããã§ãã goimports ãå®è¡ãããã¨ãgoimports 㯠gofmt ã«å ã㦠import è¡ã®ä¿®æ£ãè¡ãã ã³ã¡ã³ãæ http://golang.org/doc/effective_go.html#commentary ãåç §ã宣è¨ã«å¯¾ããã³ã¡ã³ãã¯å°ãåé·ã«è¦ãããããããªããã©å®å ¨ãªæã«ãããããããã° godoc ã§ãããã«æ´å½¢ãããã次ã®ããã«èª¬æãããã®ã®ååããå§ãããªãªãã§çµããã // A Request represents a request to run a command. type Request struct { ... // Encode writes the JSON encoding of re
ttyrec ã§é²ç»ãããã¼ã¿ã使ã£ã¦ã¿ã¼ããã«ä¸ã§åçãã¤ã¤ããã®ã¹ã¯ãªã¼ã³ãã£ããã£ã使ã£ã¦ã¢ãã¡ã¼ã·ã§ã³GIFãçæãããã¼ã«ãGoã§ä½ã£ã¦ã¿ãã https://github.com/sugyan/ttygif Releases Mac, Linux Desktopã§åä½ãåçé度ã¯ãªãã·ã§ã³ã§å¤æ´å¯è½ã èæ¯ percolã使ã£ã¦ã¿ã¼ããã«æä½ãæ©ãã便å©ã«ã - ãããã¼ãã¡ã¢ ã®ãããªè¨äºãæ¸ãããããéã«ãã¿ã¼ããã«æä½ãé²ç»ãã¦GIFã¢ãã¡ã«ãããéè¦ãããã ãããã£ãç¨éã«ä½¿ããæ±ç¨ã®ãã¹ã¯ãããé²ç»ãã¼ã«ã¨ãã¦ã¯LICEcapãGifzoãªã©ãããã Cockos Incorporated | LICEcap http://gifzo.net/ ãããã¯Windows, OSXãããã対象ã§ãLinuxã®å ´åã¯ã¾ãä»ã®ãã¼ã«ãããããã(ããç¥ããªã)ã æ±ç¨çãªã
PCéã§ã®ãã¡ã¤ã«åã渡ãã®ã¨ãã«ãã¡ã¤ã«ãµã¼ãã使ããã¨ããã¾ã«ããã¾ãããOSã«ãã£ã¦ãã¡ã¤ã«ãã¹ããã®æ¸å¼ãéã£ãããåã渡ãç¨ã®ãã£ã¬ã¯ããªãã¤ããã¨ãããã¡ã¤ã«æ¸¡ãããã ããªã®ã«ããªãã ãå°ããªã²ã£ãããããã£ã¦ã¹ãã¼ããããªããªãã¨ãã¤ãæãã¦ã¾ããã ãªã®ã§ããã£ã¨ç´æçã«ãã»ãããããã£ã¦æ¸¡ãããã¼ã«ãã¤ãã£ã¦ã¿ã¾ããã Hoi Hoiã¯ãã¡ã¤ã«ã®åã渡ããç°¡åã«è¡ãããã®ã³ãã³ãã©ã¤ã³ãã¼ã«ã§ããGoè¨èªã§æ¸ããã¦ãããHTTPãã¡ã¤ã«ãµã¼ããå©ç¨ãã¦æ©è½ãæä¾ãã¾ãã monochromegane/hoi (An easy file transfer tool using http file server.) ãã¡ã¤ã«ã渡ã 使ãæ¹ã¯ç°¡åã§ãã¼ã«ã«ã®ãã¡ã¤ã«ãã¹ãhoiã³ãã³ãã®å¼æ°ã«æ¸¡ãã ãã§ãã ããããã¨ä»¥ä¸ã®ãããªããã¦ã³ãã¼ãç¨ã®URLãåºåããã¾ãã htt
Here are my own best practices that I've gathered from my personal experiences with dealing lots of Go code for the past years. I believe they all scale well. With scaling I mean: Your applications requirements are changing in an agile environment. You don't want to refactor every piece of it after 3-4 months just because you need to. New features should be added easily. Your application is devel
5æ31æ¥ã«GoConference 2014 springã¨ããã¤ãã³ã㧠pt & Goroutine ã¨ããã¿ã¤ãã«ã®çºè¡¨ãããã¦ãããã¾ããã ä»å¹´ã«å ¥ã£ã¦ãã Goè¨èªããããããã«ãªã£ã¦ãpt(The Platinum Seacher)ã¨ããGoã§ã¤ãã£ãagã©ã¤ã¯ãªé«éæ¤ç´¢ãã¼ã«ãå ¬éãã¦ãããããããã®ã¤ãªããã§ä»åã®çºè¡¨ã¨ãªãã¾ããã å 容çã«ã¯ã以ä¸ã®ã¹ã©ã¤ãã®ã¨ãããåãã¼ã«ã®é«éåã®çµç·¯ããã©ããªããGoè¨èªã®ä¸¦è¡å¦çãå®ç¾ããæ©æ§ã§ããGoroutineã®ä½¿ãæ¹ãç¥ã£ã¦ãããã¨ããæ§æã§ããã TLã®åå¿ãªã©ãè¦ãã¨ãéè¦ã¯ããä¸å®ã®æºè¶³ã¯ããããããããªãããªã¨ã»ã£ã¨ãã¦ãã¾ãã 200åãããã®åå è ããã¦ãæµ·å¤ããã®ã¹ãã¼ã«ã¼æ¥ã¦ããã¨ããä»åã®ã«ã³ãã¡ã¬ã³ã¹ã¯ãç¦å²¡ããåå ããèªåã«ã¨ã£ã¦ã¯ãªããªãæ¬æ ¼çãªãã®ã§ãããããåºæ¿ãåããããããããã¨ããã§è©±
æ°æ©è½ ãã¦ãã£ã¼ã«ããã¤ãã³ã管çæ©è½ããªãªã¼ã¹ãã¾ãããåè³ä¼æ¥ã®ç¤¾å¡ãé¢ä¿è ã®ã¤ãã³ãåå ãåæ»ã«ãããã¨ã«æ´»ç¨ããã ãã¾ãã詳ããã¯ãã«ããã¼ã¸ãã覧ãã ããã æ°æ©è½ connpass APIã«æ°ãããæå±ã°ã«ã¼ããåå¾ã§ããAPIãã¦ã¼ã¶ã¼ã®åå ã¤ãã³ãAPIã追å ãã¾ãããåAPIã®è©³ç´°ãªä»æ§ãå©ç¨æ¹æ³ã«ã¤ãã¾ãã¦ã¯ã APIãªãã¡ã¬ã³ã¹ ãã確èªãã ãããã¾ãAPIå©ç¨å¸æã®æ¹ã¯ connpassã®APIå©ç¨ã«ã¤ã㦠ãã覧ãã ããã ãç¥ãã 2024å¹´9æ1æ¥ãããconnpassã§ã¯ã¹ã¯ã¬ã¤ãã³ã°ãç¦æ¢ããå©ç¨è¦ç´ã«æè¨ãã¾ããã以éã®æ å ±åå¾ã«ã¯connpass APIããå©ç¨ãã ãããAPIãå©ç¨ã«ã¤ãã¦ã¯ãã«ããã¼ã¸ãã確èªãã ããã
pt(the_platinum_searcher) ãé«éåããããã« Goroutines ã¾ããã§è©¦ãããã¨ãçºè¡¨ãã¾ããã http://connpass.com/event/6370/
tl;dr: å¥ã«Perlæ¨ã¦ã¦ãªãã§ããPerl大好ãã俺ã¯LLã¯Perlã§ãããã§ãå¥ãã¡ã¤ã³ã®äºããã£ã¦ãããããï¼ Rebuild.fmã«éãããå ¬ã®å ´ã§YAPC/Perl以å¤ã®è©±ãããäºãããã¨ã¯æ£ç´æã£ã¦ããªãã£ããããã®ãã³Rebuild.fm ep 42ã«ç½®ãã¦ï¼æéGoã«ã¤ãã¦ããã¹ãã¾ãã£ã¦ããã1æéã¶ã£ã¤ãæ¬çªã§ããã¹ãããäºã¯ã ãããããã¹ã£ã¦ããã®ã ãã©ããã®å¾ã®ãã£ã¼ãããã¯çããµã¾ãã¦ã¾ã¨ãã¦ããããã¨æã£ãã®ã§ãã®ã¨ã³ããªã§ã¾ã¨ãã¦ã¿ã¾ã Goäºå§ã ãããããªãã§ããã¾ã§Goãã¬ãªã¬ãªæ¸ãåºããã®ãã æ£ç´è¦ªç¶ã®ã£ã°ã¨vimã§æåãªãã®äººããGoãããï¼ãã¨è¨ãåºããã¨ãã«ã¯Goã«å¯¾ãã¦ã¯ããããããå°è±¡ãããªãã¦ç¹ã«æ³¨æãããã¦ãªãã£ããã ãã©ãããããéãè¨èªã¨ãã¡ã¤ã³ã«åãã¦ã¿ããã¼ã¨æã£ã¦æ¢ãã¦ããæã«ããã俺ããLLç³»ã®è¨èªå¥ã«ãããªããªãã¨ãµ
golangã«ã¯pprofç¨ã®ãããã¡ã¤ã«ãã¼ã¿ãåºåã§ããã©ã¤ãã©ãªãæ¨æºã§ã¤ãã¦ããã®ã§ããããã使ããã¨ã§ã¡ã¢ãªã®ä½¿ç¨ç¶æ³ã調ã¹ããã¨ãã§ãããä¸ã§ããnet/http/pprofãæ軽ã§ä¾¿å©ã ã£ãã net/http/pprofãããã°ã©ã ã«çµã¿è¾¼ããã¨ã§ãã¤ãããã¯ãªãããã¡ã¤ã«æ å ±ãWebãã©ã¦ã¶ã§è¡¨ç¤ºãã¦ã¿ããã¨ãã§ããã使ãæ¹ã¯ãã©ã¤ãã©ãªã®è§£èª¬ãã¼ã¸ã«ããã¨ãããªãã ãã©ããããã¡ã¤ã«ãåãããããã°ã©ã 㧠import _ "net/http/pprof" ã¨importãããã¨ãmainé¢æ°ãªã©ã§ go func() { log.Println(http.ListenAndServe("localhost:6060", nil)) }() ã¨æ¸ãã¦ããã¨è¯ãã ãã®ç¶æ ã§ããã°ã©ã ãbuildãã¦å®è¡ãããããã°ã©ã ã®å®è¡ä¸ã«ãhttp://localhost:606
Goè¨èªã§ã®æ§é ä½å®è£ ã¯ãåè¾¼ãç¬èªã³ã³ã»ããã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ãã£ãGoè¨èªç¬èªã®æ©è½ãç解ãã¦è¡ãå¿ è¦ãããã¾ãã ä»å¹´ããGoè¨èªãå§ãã¾ãããç解ãææ§ãªã¾ã¾ã ã¨å®è£ ã«è¿·ããã¨ãä½åº¦ãããã¾ãããä»åããæ©ä¼ãªã®ã§ãGoè¨èªã§ã®æ§é ä½å®è£ ãã¿ã¼ã³ã¨ãã¦ã¾ã¨ãã¦ã¿ããã¨ã«ãã¾ããã æ§é ä½å®è£ ãã¿ã¼ã³ å®è£ ãã¿ã¼ã³ã®æ´ãåºãã¨ãã¦ãGoFãã¶ã¤ã³ãã¿ã¼ã³ãGoè¨èªã§å®è£ ããææ³ãã¨ãã¾ããã ãã®ä¸ã§ç¹°ãè¿ãç¾ããå®è£ ãGoè¨èªã§ã®æ§é ä½å®è£ ãã¿ã¼ã³ã¨ãã¦ã¾ã¨ãã¦ã¿ã¾ããã ã³ã³ã¹ãã©ã¯ã¿é¢æ° ã¨ã¯ã¹ãã¼ãã«ããã¢ã¯ã»ã¹è¨±å¯ ã¤ã³ã¿ã¼ãã§ã¼ã¹ã«ããããªã¢ãã£ãºã æ§é ä½ã«ããããªã¢ãã£ãºã æ§é ä½ã«ãããµãã¯ã©ã¹ã»ã¬ã¹ãã³ã·ããªã㣠æ§é ä½ã«ããç§»è² é¢æ°ã«ããç§»è² ä»¥ä¸ãããããã®ãã¿ã¼ã³ã解説ãã¦ããã¾ãã ã³ã³ã¹ãã©ã¯ã¿é¢æ° Goè¨èªã«ã¯æ§é ä½ã®ã³ã³ã¹ãã©ã¯ã¿ããªããããæ§é
Goè¨èªã®ååã®ç±æ¥ã«ã¤ãã¦ããããæãã¤ããGoè¨èªã®ååã®ç±æ¥ã«ã¤ãã¦ããããæãã¤ããã®ã§ãã¡ãã£ã¨é¢ç½ãã¨æã£ã人ã¯åºãã¦ã»ããã Goè¨èªã®ååã®ç±æ¥ã£ã¦ç¥ã£ã¦ãï¼ ããã¯æ¥æ¬èªã®æ°åã®ï¼ï¼ã´ã¼ï¼ããæ¥ã¦ããã ãã ï¼ã¯ï¼ï¼ã·ã¼ï¼ãã¤ã¾ãCè¨èªã®æ¬¡ã ããã ã¤ã¾ãC++ãC#ã¨åãç±æ¥ãªã®ãã ããC#ã¯C++++ãªãã ããç¥ã£ã¦ãï¼ï¼æ³¨ï¼ããã¯æ¬å½ï¼ ãããªæãã§ã Goè¨èªã¯ãã¬ã¤ã¯å¯¸åã§ãããããªãã®é¢å¿ãéãã¦ããããã¾ã 詳ããç¥ããã¦ã¯ããªãã®ã§ããããåºããã«ã¯ä»ã絶好ã¨æãã ãªãã§ããã»ãã¤ã¯ãã±ã³ã»ãã³ãã½ã³ãæ¥æ¬èªãç¥ã£ã¦ããã ãã¨ãã£ã¨ããªææãåããå ´åãããªæãã§è¿ãã¦ããã ãããã ããã»ãã¤ã¯ãã±ã³ã»ãã³ãã½ã³ãUTF-8ã®èæ¡è ã ã¨ãããã¨ã¯ç¥ã£ã¦ãï¼ï¼æ³¨ï¼ããã¯æ¬å½ï¼ ã§ãå½¼ãããããèæ¡ãããã£ããã¯ãæ ¶æã®æäºç´å çãããã«ç ã§ãæ¥æ¬èªãã«ã¤
Goè¨èªã§ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã使ãã¨ãã¯æ¨æºã®flagsããã±ã¼ã¸ã使ããã¨ãå¤ãã¨æãã¾ãããgo-flagsã使ãã¨ãªãã·ã§ã³ã®ä»æ§ãå®ç¾©ããã ãã§ãã¾ããã¨ãã£ã¦ãããã®ã§ä¾¿å©ã§ãã go-flags go-flagsã¯ã³ãã³ãã©ã¤ã³ãªãã·ã§ã³ã®ãã¼ãµã¼ã§ãããªãã·ã§ã³ã®ä»æ§ãå®ç¾©ããæ§é ä½ã«ãã³ãã³ãã©ã¤ã³å¼æ°ããã¤ã³ãããããå®ç¾©ããä»æ§ãããã«ããæ´å½¢ã»è¡¨ç¤ºãã¦ããã¾ãã æ¨æºã®flagsããã±ã¼ã¸ã«æ¯ã¹ã¦ããªãã·ã§ã³æå®æ¹æ³ãæè»ã§ãããã¨ãæå®ããããªãã·ã§ã³ãæ§é ä½ã¨ãã¦ããã°ã©ã å ã§å©ç¨ã§ãããã¨ãå¤ã®ãã¤ã³ãããã«ãã®çæãªã©ã®å®åçãªå®è£ ãè¡ããªãã§ãããªããã¨ãã¨ããã³ãããããªã®ã§ä½¿ããªãçç±ã¯ãªãã§ãããã ã¤ã³ã¹ãã¼ã«
ãã¾ãé«éãã¿ã¼ã³æ¤ç´¢ã¨ããã°ag(The Silver Searcher)ã§ãããæ¤ç´¢å¯¾è±¡ãUTF-8ã®ããã¹ããåæã¨ãã¦ãããããEUC-JPãShift-JISã¨ãã£ããã¡ã¤ã«ãæ¤ç´¢ããã®ã«èª²é¡ãããã¾ãã ããã¾ã§ããããã®æ¥æ¬èªæåã»ãããæ¤ç´¢ã§ããããã«ãããããè²ã ã¨agã®æ¹é ãå ¬éãè¡ã£ã¦ãã¾ããã ag(The Silver Searcher)ã§EUC-JP/Shift-JISã®ãã¡ã¤ã«ãæ¤ç´¢ã§ããããã«ãã¦ã¿ã æ¥æ¬èªåç¹ååag -ç½é- ã®é åãå®äºãã¾ãã ããããç¹å®ã®å½ã®æåã³ã¼ãã ãã«ç¹åããä¿®æ£ã¨ããã®ãmasterã«åãè¾¼ãã§ãããããã«ãããããæ´¾çãã©ã³ãã¨ãã¦è¿½éããã®ãããã¯ãé¢å⦠ããã§å¹´å§ã«Goè¨èªã触ã£ãã®ããã£ããã«ãGoè¨èªã§ãã¿ã¼ã³æ¤ç´¢ãã¼ã«ãã¤ãã£ã¦ã¿ã¾ããã ãã£ãããªã®ã§ãã¹ãagãç®æãã¦ããã©ãããµã¼ãã£ã¼(The Pl
history 13/3/31 Tag ã«ã¤ãã¦è¿½å intro Go ã触ã£ã¦ã¦ interface ãç¨ããè¨è¨ãã¾ã ã¾ã ããããã£ã¦ãªãã£ãã®ã§ãä¸æ¦ã¾ã¨ãããã¨ã«ãã¾ããã Go ã«ã¯æ示çãªç¶æ¿ã®æ©è½ã¯ç¡ãã interface ãä¾ãã° Java ã®ããã¨ã¯ããªãæ¯è²ãéãã®ã§ã(Class ã§ã¯ãªã) Struct ã®è¨è¨ã«çµæ§çãããã¨æãã¾ãã Go ã® interface ã¯è¨èªè¨è¨çã«ãããªãå°ã£ã¦ãã¦ã Go ã¨ããè¨èªãå¼·ãç¹å¾´ä»ãã¦ããã¨åæã«ã Go è¨èªèªä½ã®éçºè ãã¡ããã®æ©è½ãããªãéè¦è¦ãã¦ãã¾ãã ä¾ãã°ã Go ã®éçºè ã®ä¸äººã§ãã Russ Cox æ°ã«ããã° Go's interfacesâstatic, checked at compile time, dynamic when asked forâare, for me, the most
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}