ããã°ã©ãã³ã°è¨èªGoåå¼·ä¼ 2010/06/20 0:08 ã« Takashi Muraoka ãæ稿 [ 2010/07/19 6:15 ã«æ´æ°ãã¾ãã ]
ããã°ã©ãã³ã°è¨èªGoåå¼·ä¼ 2010/06/20 0:08 ã« Takashi Muraoka ãæ稿 [ 2010/07/19 6:15 ã«æ´æ°ãã¾ãã ]
Google æ§ããæ°ããããã°ã©ãã³ã°è¨èªãGoããçºè¡¨ããã¦ãæ°æ¥çµéãã¾ããã ãã¼ã«ã«ç°å¢ï¼Mac, CentOSï¼ã«ã¯ç°å¢æ§ç¯ãã¦ã¿ããã®ã®ããã£ã±ã³ã³ãã¤ã«ã¯åä½ç°å¢æ¯ã«ããã¹ãã ããªãã¨ãã¨ãããã CORESERVER 㸠Go è¨èªéçºç°å¢ãæ§ç¯ãã¦ã¿ã¾ããã ä»ã®ã¨ãã CORESERVER ã§ä½ããåä½ããããã¨ããããããé¡ãã®ãã¨ã¯ä¸åèãã¦ãªããã§ããã©ãï¼ ã¤ã³ã¹ãã¼ã«ã¯ Installing Go ãåèã«é²ãã¾ããã ãªãã¸ããªãããã¼ã¿ãåå¾ãã¦æ§ç¯ãããã Python ãã¼ã¹ã® Mercurial ãã¤ã³ã¹ãã¼ã«ãã¾ãã CORESERVER 㧠Mercurial ãã¤ã³ã¹ãã¼ã«ããå ´åãsetuptools ãç¨ãããã以ä¸ã®ãã¼ã¸ãåèã«ãã¦ã¿ã¦ãã ããã ã[è¨èª][Python][ã¡ã¢]ã¬ã³ã¿ã«ãµã¼ãã¼ã§ Python 追å ã¢ã¸ã¥ã¼
æãè¦ã¦Goè¨èªã試ãä¸ãé©å½ã«ç°¡åãããªããã±ã¼ã¸ã¨ãã使ããªããGoã£ã½ãæ¸ãæ¹ã«æ £ãã¦ã¿ããã¨ã«ããã ãªãã¸ã§ã¯ãã®åæåæ¹æ³è²ã ãµã³ãã«ã³ã¼ãã¨ããè¦ã¦ããã¨ããªãã¸ã§ã¯ãçæã®æ¸ãæ¹ã¯ããã¤ããã£ã¦ãåå{ã} ã使ãæ¹æ³ãnew ã使ãæ¹æ³ãmake ã使ãæ¹æ³ãªã©ãããããã ãã¾ã ããããã®ä½¿ãæ¹ã¨ãç¹å¾´ã¨ãã¾ã ããåãã£ã¦ãªããã© åå{ã} ã®ä½¿ãæ¹ã¯ä½ã¨ãªãããã£ãã®ã§ã¡ã¢ã âãããªæãã«æ¸ããããã ã package main import ( "fmt"; ) type A struct { a int; b string; } func main() { //typeã§å®ç¾©ãããé çªã«åæå¤ãä»£å ¥ããæã var a1 A = A{1, "a1"}; //ãã£ã¼ã«ãåãæå®ããåæåãåºæ¥ã var a2 A = A{a:2, b:"a2"}; //ãã£ã¼ã«
golang-nutsãè¦ã¦ãããã¤ã15åã»ã©åã«ãDownload initial Windows port of go hereããªãã¦ããæ稿ããã£ãã®ã§æ©éè½ã¨ãã¦è©¦ãã¦ã¿ãã ã¾ã http://code.google.com/p/go-windows/ ãã go-1.zip ããã¦ã³ãã¼ããã¦è§£åãã¾ãã goãã£ã¬ã¯ããªãé©å½ãªå ´æï¼ããã§ã¯ã¨ããããC:\goï¼ã«ç½®ãã¦ä»¥ä¸ã®ããã«ç°å¢å¤æ°ãè¨å®ãã¾ãã set GOROOT=C:\go set GOOS=mingw set GOARCH=386 set PATH=%PATH%;%GOROOT%\bin cmd.exeã§8gã¨æã¤ã¨ç¢ºãã«æ®éã«ä½¿ãããã§ãã C:\Users\kawaz\Desktop\gotest>8g flags: -I DIR search for packages in DIR -d print
ï¼æ¥ã»ã©åããããã¦ã³ãã¼ãå¯è½ã¨ãªã£ã¦ããgo-windows(ãã¡ã)ã golangãã¦ãã人ã ã¨windowsãªäººã ã¨ã¯æ¥ç¹ãå°ãªãã®ãããã¾ã ã«ã¨ã³ããªã¼ããªããããªã®ã§ãä¸å¿MSDNã¦ã¼ã¶ã¼ã ã£ããããèªåãã¨ã³ããªã¼ãã¦ãã(ã¨ãã£ã¦ããããããææããªã®ã§ãã¡ããã¨ãã追å ã¨ã³ããªã¼ãæå¾ ãã¤ã¤)ã 注æã以ä¸ãwindows-vistaã§ã®ä¾ ã³ãã³ãã©ã¤ã³(cmd.exe)ã§MSã´ã·ãã¯ãªã©ã使ããããã«ãã¦ãã (ãã¨ãã°ããã®ããããåèã«ããã¦ããã ãã¤ã¤)ã â»ã¬ã¸ã¹ããªãããããåèµ·åããå¿ è¦ããã ãã¡ããããgo-1.zipããã¦ã³ãã¼ãã解åå ã決ãã¦ã解åã 解åå ã«ã³ãã³ãã©ã¤ã³ã®ã·ã§ã¼ãã«ãããä½ãã ãï¼ãã§ä½æããã·ã§ã¼ãã«ãããå³ã¯ãªãã¯ããèµ·åæã®æåã³ã¼ããutf-8ã¨ãããå ·ä½çã«ã¯ããªã³ã¯å ãã%SystemRoot%\syste
翻訳ããã¸ã§ã¯ãã«ã¤ãã¦Â¶ ãã®ç¿»è¨³ã¯ Sphinx ã使ã£ã¦ä»¥ä¸ã®ãµã¤ãã§å ±åã§è¡ã£ã¦ãã¾ãã翻訳ã«åå ãå¸æã®æ¹ã¯ã yoshiki at shibu.jp ã¾ã§ãé£çµ¡ãã ããã http://bitbucket.org/shibu/golang-docjp/ 翻訳ã«ã¼ã«Â¶ ã¾ãã¯Bitbucketã®ã¢ã«ã¦ã³ããä½ã£ã¦ãé£çµ¡ãã ãããæ¸ãè¾¼ã¿æ¨©éãè¨å®ãã¾ãã 翻訳ããããã®ãããæ¹ã¯ä¸è¨ã®Bitbucketã®ãµã¤ãä¸ã§ãã±ãããçºè¡ãã¦ãã ãããIssueã¿ãã§ãã大é ç®åä½ã§ãã 翻訳ã¯èªã¿ããããèãã¦ãã§ãã»ã¾ãã調ã§çµ±ä¸ãã¾ãã Sphinxãã£ã¬ã¯ãã£ãã使ã£ãç¸äºãªã³ã¯ã¯æãªã¨ãã«è¨å®ãã¾ãããããã¯æ¸ãè¾¼ã¿æ¨©éã®ããæ¹ã¯è¨å®ãã¦ããã£ã¦ãæ§ãã¾ããã Mercurialã§cloneãã¦ç¿»è¨³ãã¦ããcommitãpushãã¦ãã ãããcommitåã«pull&update
The document contains Go code snippets demonstrating various Go language features including: 1. Setting up a Go development environment and compiling a simple "Hello World" program. 2. Defining structs, slices, maps and functions. 3. Using channels and goroutines for concurrency. 4. Implementing interfaces and polymorphism. 5. Recursive and anonymous functions. 6. Demonstrating differences between
俺éã®ãã½ã³ã³ç²ååã¯çµããã¾ãããè³éããããã¨ãããªã ä¼æ´¥è¥æ¾ã¯ã·ã³ãã³ããã«ã«æ³ã¾ãã¾ãããã¤ã³ã¿ã¼ãããã使ãã¾ãã幸ãã ã¾ã æ¥ä»ã¯è¶ãã¦ãã¾ããããæ¨æ¥ã®æµã¯ä»æ¥ã®ããã§ããã¨ãããã¨ã§id:JAPLJãç¡çã«èªããGoãåå¼·ãã¾ããã ã¤ã³ã¹ãã¼ã« æ©é Go è¨èªã試ãã¦ã¿ãï¼ - ITæ¦è¨ ãã¡ã®ç°å¢ã®å ´å export GOOS=linux export GOARCH=386GOARCHã386ãªã®ã§ã³ã³ãã¤ã©ã®ååã6gã§ã¯ãªã8gã¨ãã«ãªãã¾ãã ãã¹ãããã Go 㧠goroutine - é æ¥è¨ ã¯ã¦ãªæ¯åº ååã®ç±æ¥ çºãã¦ããçºè¦ããã®ã§ãããGoã®ãããã¬ã¯Ogleã£ã¦è¨ããã§ããã æ§æ ãããã¯ã®æ³¢æ¬å¼§ã¯çç¥ã§ããªããªã£ãããã§ãã whileã¨forã¨foreachã¨while(true)ã¯å ¨ã¦ãforãã§æ¸ãã¾ãã for {}//while(
http://atnd.org/events/2115 ã¨ããã¤ãã³ããããã¾ããã11æ14æ¥ã«ãGoogleæ¸è°·ãªãã£ã¹ã§ããã¾ããã ã¾ãã¯ããã«ãGoogleããã«ã¯å ´æãæä¾ãã¦ããã£ãä¸ã«Googleã®ä¸ã®äººã«ãåå ãã¦ããã£ã¦çµæçãä¸ãã£ãã®ã§æ¬å½ã«ãããã¨ããããã¾ããã¨ããããããã¨ããããã¾ããã ã§ã次ã«ãGoè¨èªã®ãã¹ã³ãããã£ã©ã¯ã¿ã¼ã®ååã¯ä¸é¨ã®è³åãå¾ã¦åæã«ãããããã(TAWASHI-KUN)ãã¨ããäºã«ãã¦ããã¾ããããã¡ã ã¨æãã¾ããã§ããªãã¨ããååãªãã§ãããã ä»èª¿ã¹ãã¨ãã¡ããã¨ååããã£ãã®ã§ãé§ç®ã§ãã (http://japan.cnet.com/special/story/0,2000056049,20403390,00.htm) åããããgoã³ã³ãã¤ã©(8g)ãè½ã¨ãããã©ããã§ããã©ã¾ãè½ã¨ãã¾ããã§ããã ã©ãããæ¹åã§æ»ãã
åã® Go ãã¡ãã£ã¨ä½¿ã£ã¦ã¿ã¾ãããéçºè ãèå³ãªãã®ããããã¾ãå å®ãã¦ãªãã°ã©ãã£ãã¯ã¹ã¾ããã«ããã¦çªæã ãããªæãã®pngç»åãåºåãã¾ããã½ã¼ã¹ã¯ä»¥ä¸ã® gist ã«ã main.go canvas.go ããã°ã©ã ã®æ§é ã¯ä»¥ä¸ã®ãããªæã ããã°ã©ã ã®æçµçãªç®æ¨ã¯ãæ¨æºã©ã¤ãã©ãªã® image.png.Encode é¢æ°ã使ã£ã¦PNGãã¡ã¤ã«ãæ¸ãåºããã¨ã image.png.Encode é¢æ°ã¯ io.Writer 㨠image.Image ã¤ã³ã¿ã¼ãã§ã¤ã¹ã®å®è£ ãè¦æ±ãã¦ããã®ã§ãå¿ è¦ãªé¢æ°ãå®è£ ããï¼é»è²ã®é¨åï¼ã ããã«ããã¡ã¤ã«ãéããããç»åã«æç»ãããã¨ãã£ãç¬èªã®åä½ãå®è£ ããï¼ç·è²ã®é¨åï¼ ã¨ããæµãã§ããã°ã©ã ãåºæ¥ä¸ãã£ã¦ããã¾ããio.Writer ã image.Image ã¯ã©ã¤ãã©ãªéã§ã¯ãªããã¤ã³ã¿ã¼ãã§ã¤ã¹ã ããå®ç¾©ããã¦ãããè¦ç´é
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}