If you don't have an account, sign up. Forgot your password? Reset it with your email. Sign in
Goè¨èªã¯ã·ã³ãã«ãã念é ã«ãã¶ã¤ã³ãããè¨èªã§ããä»æ§ã¯åç´æçãã®ããã«å°ããåãããã¦ãã¾ããããã®ãã表ç¾åã«æ¬ ãã¦ããã¨ããã³ã¼ããåé·ã«ãªãã¨ããå°è±¡ãæã¤äººãå¤ãã§ããããæåãªã¨ããã§ã¯ãã¸ã§ããªã¯ã¹ãä¾å¤ã¨ãã£ãæ©è½ãï¼ä»ã®ã¨ããï¼åå¨ããªããã¨ãåé¡ã«ããããã¨ãå¤ãããã§ãã ä¸è¬ã«ãã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ãªã³ã°ã¨ãããã®ã¯æ¸ãããè¨èªã ãã«ä¾ããã®ã§ã¯ããã¾ãããè¦ç¹ãæ¡ãã¦Goãåãã¾ããã¼ã«ç¾¤ãå«ãã¦è¦ã¦ã¿ãã¨ãgo fmt ã goimports ã¨ãã£ããã¼ã«ãåºã使ããã¦ãããã¨ãã¾ã go generate ã³ãã³ãã®åå¨ãªã©ãè¦ã¦ããGoã¨ããè¨èªã«ã¯ã人éã®ããã°ã©ãã³ã°ãæ©æ¢°ã«ãã£ã¦ãã¾ãã¾ãªé¢ããè£å©ãããã¨ããæ 度ãããã¾ãã
2015-04-13 IntelliJ IDEAã§GoLangã®ç°å¢æ§ç¯ 2015æ¥ GoLang IntelliJ IDEA ä¹ ãã¶ãã«IntelliJ IDEAã§GoLangã®ç°å¢æ§ç¯ãã¦ã¿ããããªããåã¨ã¯ã¡ãã£ã¨å¤ãã£ã¦ããã®ã§æ¸ãæ®ãã¦ããã¾ãã 諸æºå Goã®ã¤ã³ã¹ãã¼ã« ã¨ããããhomebrew使ãã¾ããç¾ç¶ã®ææ°çã¯1.4.2ã§ãã $ brew install go 次ã«ãç°å¢å¤æ°ãè¨å®ã.bashrcã¨ã.zshrcã¨ãã«è¨è¿°ãã¾ãã export GOPATH=$HOME/_go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin â»homebrewã§å ¥ããå ´åãGOROOTã¯å¿ è¦ãªãï¼ã¯ãï¼ã§ãã IntelliJ IDEA Communityã§ãUltimateã§ãã©ã¡ãã§ãè¯ãã®ã§ãåèªã§ç¨æãã¦ãã ããã ãã©ã°ã¤ã³ã®ã¤ã³ã¹ã
Goæ¸ãã¦ã¦ãªãã¨ãªãè¦ãã¦ãã Goã§ãã£ã¡ããããªããã¿ã¼ã³ WAFå°å ¥ãã¦ããããWebã¢ã㪠WAFèªä½ãç¾å¨ç¾¤éå²æ ç¶æ ã WAFæ¯ã«ãã³ãã©ã¤ã³ã¿ã¼ãã§ã¼ã¹ãéãã®ã§æ¢åã³ã¼ãã¤ãªãã«ã¯ã©ããã¼ãå¿ è¦ã ã©ã®WAFãLLè¨èªã«æ¯ã¹ãã¨ã¾ã ã¾ã ãã£ã¼ãã£ã¼ã®ç¶²ç¾ ç¯å²ãçãã ãªã®ã§ãã¡ããLLè¨èªã»ã©æ¥½ã«ã¯æ¸ããªããã¨ãå¤ãã ãªãã¬ã¯ã·ã§ã³ä½¿ãã¾ããã§ãã¼ã¿ã«æ§è½ã¯LLè¨èªä¸¦ã¿ã«é ãã®ãããã Go1.7ã®contextããã±ã¼ã¸ã®å°å ¥ã§æ¨æºã®HTTPãã³ãã©ã復権ããå¯è½æ§ãããæ´ã«èããäºæ³ã 追è¨: 楽ã§ããã®ãæå¾ ãã¦WAFãå°å ¥ããã®ããã£ã¡ããããªããã¨ã¾ã§ã¯è¨ãéãã ã£ããããããªãããã©ä¾ã®sqlã§Prepareãæ£ãã使ãã¦ããªãã§æ§è½åºãªãã£ã件ã¨ããå½é¢WAFã使ããªãèªåã§æ¦ãä¸èº«ãç解ãã¦ä½¿ãè¦æãå¿ è¦ã æ§é ä½ã¡ã½ããã«ãã¸ãã¯ãè©°ãè¾¼ã Goã®ææ³
Golangãä¸çªããã©ã¼ãã³ã¹ãè¯ããã¨äºæ³ãã¦ãã¾ããããå ¨ãéã®çµæã«ãªã£ã¦ãã¾ãã¾ããã Golangãé ãçç± é ãåå ãããã¤ãèãã¦æ¹åã§ããªãã試ãã¦ã¿ã¾ããã詳細ã¯çãã¾ããã以ä¸ã®ç¹ã«ã¤ãã¦ã¯åé¡ãªãããã§ããã goroutineã¯ãªã¯ã¨ã¹ãåä½ã§èµ·åãã¦ãã ã³ãã¯ã·ã§ã³ãã¼ã«ã¯æå¹ã«ãªã£ã¦ãã Beegoã®ORMç¹æã®å¦çã¯ä¸»åå ã§ã¯ãªã(æ¨æºã©ã¤ãã©ãªã®sqlé¢æ°ã¨å¤§å·®ãªã) DBå´ã®CPU使ç¨çã¯100%ã«ãªã£ã¦ããããCPU使ç¨çã¨ã¡ã¢ãªä½¿ç¨éã¯PHPç°å¢ã¨åç¨åº¦ã®è² è·ã«ãªã£ã¦ãã ããã¾ã§ç¢ºèªãã¦ããããã¡ã¤ã©ã使ã£ãæ¹ãè¯ãããã«æããã®ã§ããã£ãããããã¡ã¤ã©ã§ç¶æ³ã確èªããããã«ãæ¨æºã§æä¾ããã¦ãã¦æ軽ã«ä½¿ããããªpprofã使ã£ã¦ã¿ã¾ãããtopã§ç¢ºèªããã¨æ¬¡ã®ãããªçµæãã§ã¾ããã (pprof) top 20 -cum 920ms of 15
mattnããã®ã¨ã³ããªã«è§¦çºããã¦ãææã§ä½¿ç¨ããã¡ãã£ã¨å¤ãã£ãgolangã®ãã£ã³ãã«ã®ä½¿ãæ¹ããç´¹ä»ãã¾ãã mattn.kaoriya.net ç¹å®ã®å¦çã®ä¸¦å度ãããç¨åº¦ã¾ã§ã«æããããã¿ãããªã³ãããã¾ãããï¼ ä¾ãã°CPUããã¼ãªå¦çã®ä¸¦åæ°ãããã ãã³ã¢æ°ãããã¾ã§ã«æããããã¨ãã ãããªã¨ãã¯ãããã¡ä»ããã£ã³ãã«ãç¨æãã¦ããã¦ãå½è©²å¦çã®åå¾ã§ãã®ãã£ã³ãã«ã«write/readããããã¨ã§ãã»ããã©çãªå¶å¾¡ãã§ãã¾ãã 以ä¸ã®ãããªã«ã³ã¸ã§ãã package main import ( "fmt" "sync" "time" ) var ch chan int = make(chan int, 4) // 並å度ã4ã«å¶é func heavyFunc(i int) { ch <- 1 // ãã£ã³ãã«ã®ãããã¡ãã¤ããã¤ã«ãªã£ã¦ãããããããã¯ãã defe
golang ã® channel ã¯ä»ã®è¨èªã«è¦ãªãç¬ç¹ã®ãã©ãã¤ã ãéçºè ã«æä¾ãã¾ãã åç´ã«ã¹ã¬ããéã§ã¡ãã»ã¼ã¸ã³ã°ãããã ãã§ãCè¨èªã§æ¸ãã°ããããã®éã«ãªã£ãããæ £ãã¦ããªã人ã§ããã°ã©ãå®è£ ããã°ãããåãããªããªãã¦äºããã£ãã¨æãã¾ããããã golang ã® goroutine/channel ã¯ããã£ã¦ããå 容ã®å²ã«ã¨ã¦ã容æã«ã¹ã¬ããééä¿¡ããã¥ã¼ã¤ã³ã°ãå¦çã®åãå¾ ã¡çãå®è£ ã§ããæ§ã«ãªã£ã¦ãã¾ããå°ãchannel ãã©ã®æ§ã«é©ç¨ãããè¯ããã«ã¤ãã¦ã¯ä»¥ä¸ãåç §ä¸ããã Big Sky :: Golang ã® channel ã®ä½¿ãæ golang ã®ç¹å¾´ã¨è¨ãã° goroutine 㨠channel ã§ããããã®ä½¿ãã©ããã«æ©ã人ãããããæ§ã§ãã goroutine ã¯éåæã«å®è¡ãããå¦çãchannel ã¯ãã® grout... http://mat
表1. è¨èªå¥ã¹ãã³ã¢ããè¨æ¸¬ ä½æçã«ã¯å¤§ããªéãã¯ãªãã¨æãã¾ãããGOè¨èªã®ã¹ãã³ã¢ããã¯PythonãPHPãããåªãã¦ãããã¨ããããã¨æãã¾ãã éçºç°å¢ã¯ä½ãé¸ã¶ã¹ãã éçºç°å¢ã«ã¯äººãããã好ã¿ãããã¨æãã¾ãããæè¡ç³»ç¥èã®å ±æãµã¤ãã§æåãªQiitaã§IDEã«é¢ããè¨äºã®å²åãè¦ã¦ã¿ãã¨ããããIntelliJ IDEAããå©ç¨ãã¦ããã¦ã¼ã¶ãå¤ãããã«æãã¾ãã ç¾ç¶GOã®éçºããããªãå ´åã¯IntelliJ IDEAãã¹ã¿ã³ãã¼ãã®ããã§ãã®ã§ãã¯ããã¦GOè¨èªã«è§¦ããæ¹ã«ã¯IntelliJ IDEAã®ãå©ç¨ããå§ããã¾ããã¡ãªã¿ã«IntelliJ IDEAã§GOã®éçºç°å¢ãæ§ç¯ããããã®è¨äºã¯Qiitaã«å¤ãæ稿ããã¦ããã¾ãã®ã§ããã²ãã¡ããåèã«ãã¦ãã ãã(â»4)ã â»4 å人çã«ã¯ä»¥ä¸ã®è¨äºããªã¹ã¹ã¡ã§ãã http://qiita.com/kaiinui
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}