The golang.design Initiative Hopefully everything about Go! PROJECTS /history /under-the-hood /research /go-questions /miner /gossa /more! © 2021 The golang.design Initiative About Contact Sponsors
ãã®è¨äºã¯Go Advent Calendar 2020 16æ¥ç®ã®ä»£æè¨äºã§ããå¥ããã16æ¥ç®ã«Go1.16ã®è©±ããããã¨ã«ãªãã¾ããã ã追è¨ãã¿ã¤ãã«æ¹é¡ãã¾ãã ç¶æ³ãè½ã¡çãã¦ã ãã¶çµã£ãã®ã¨ãæªã ã«å¤ãã®æ¹ã«ãã®è¨äºãè¦ã¦ããã ãã¦ãããã¨ãããGo1.16ã§ã®å¤æ´ã¨ãããããä»ãçããç§éãã©ãããã°ããããã¨ããç¹ã«ãã©ã¼ã«ã¹ããã¿ã¤ãã«ã«æ¹é¡ãã¾ãããæ¬æã«å¤æ´ã¯ããã¾ãããä¸å¿æ³¨è¨ããã¨ãgo get ãå»æ¢ã«ãªã£ãããã§ã¯ãªããæ®æ®µã®éçºããã¼ã§ä½¿ããã¨ã¯ã¾ããªããªã£ããã¨ããæå³ã§ããï¼ä¸éãèªãã§ããã ããã°ãåããããã ãããã¨ãï¼ ã追è¨ãGo1.18ã«ã¤ã㦠ã¤ãã«å¾ æã®Go1.18ããªãªã¼ã¹ããã¾ãããï¼ https://go.dev/doc/go1.18#go-command ããã¦äºåéã go get ã«ããã¤ã³ã¹ãã¼ã«æ©è½ã¯åé¤ããã¾ãããã©ãã
ããã«ã¡ã¯ãProduct Securityãã¼ã ã®@gloriaã§ããååãèªååãã¹ãã¨ã³ã¸ãã¢ããã»ãã¥ãªãã£ã¨ã³ã¸ãã¢ã¸ã®ãã£ãªã¢ãã§ã³ã¸ã«ã¤ãã¦è¨äºãæ¸ãã¾ããã ä»æ¥ã¯ãæè¿OSSã¨ãã¦å ¬éãã社å ãã¼ã«ã®ããã¸ã§ã¯ãã«ã¤ãã¦ã話ããããã¨æãã¾ãï¼ ãTestdeckãã¨ã¯ï¼ Testdeckã¯Golangã§æ¸ããgRPCãã¤ã¯ããµã¼ãã¹ã®ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ããã¨ã³ããã¼ã¨ã³ããã¹ãï¼E2Eï¼ã¨ã»ãã¥ãªãã£ãã¹ãã®èªååãã¼ã«ã§ãã以ä¸ã®æ©è½ãæä¾ãã¦ãã¾ãï¼ gRPCã¨HTTPã¨ã³ããã¤ã³ãã®ã¤ã³ãã°ã¬ã¼ã·ã§ã³ãã¹ãã»E2Eãã¹ã ãã¡ãºãã¹ã æªæã®ãããã¤ãã¼ãã®æ³¨å ¥ï¼Burp Suiteã®Intruderã¨ããæ©è½ã®ããã«ï¼ gRPCã¨HTTPãªã¯ã¨ã¹ãã®ã¦ã¼ãã£ãªãã£ã¡ã½ãã CharlesãBurp Suiteãªã©ã®ãããã®ã³ã°ããã¯ã·ã¼ã«æ¥ç¶ãããªã¯ã¨ã¹ãã®
ã¯ããã«Goã§ãã¼ã¿ãã¼ã¹ãæ±ãå ´åãGorm, Gorp, sqlx ã¨ãã£ã O/Rããã ããã使ããã¾ããå¤ãã®å ´åã¯æ§é ä½ã®ãã£ã¼ã«ãã¨ãã¼ã¿ãã¼ã¹ã®ã«ã©ã åã®ãããã³ã°ãããã¿ã°ä»ãã®æ§é ä½ãå®è£ ãã¾ããä¾ãã° Gorm ãç¨ã㦠users ãã¼ãã«ã«ã¢ã¯ã»ã¹ããå ´åã以ä¸ã®ãããªæ§é ä½ãä¸ä¾ã¨ãã¦èãããã¾ãã model_user.gotype User struct { UserID string `gorm:"column:user_id;primary_key"` UserName string `gorm:"column:user_name"` } func (u *User) TableName() string { return "users" } Gorm ã Xorm ã¨ãã£ã O/Rããã ãç¨ããå ´åãã¹ãã¼ãããæ§é ä½ãçæã§ãããæ§é ä½ã®çæãé¢å
GAEï¼Standard Environmentï¼ã§åä½ããWebã¢ããªã±ã¼ã·ã§ã³ãGoã§æ¸ãã¦ããããµã¤ã³ã¢ããããã¦ã¼ã¶ã¼ã®æ å ±ãªã©ãæ°¸ç¶åãããã¨ããå ´åãGAE ã§ç´ ç´ã«ããã¨ãã㨠Datastore ã使ããã¨ã«ãªããæ Java 㧠GAE ã¢ããªã±ã¼ã·ã§ã³ãæ¸ãã¦ããã¨ãã«ã¯ Slim3 ã¨ãããã¬ã¼ã ã¯ã¼ã¯ã使ã£ã¦ Datastore ã«å¯¾ããæä½ããããªã£ã¦ããããç¾ä»£ã»Goã§ãã¨ãªãã¨ãããããªãã¨æã£ã¦ããã®ããmercari/datastoreã github.com èªåã®è¨èã§ãã¤ãããã¨ãããã»ã©ãæ¨æºã©ã¤ãã©ãªã§ã® datastore æä½ããã£ã¦ããããã§ã¯ãªããããã®ä»ã®ãªã«ãã¨æ¯ã¹ã¦ã¿ãããã§ããªãã......ã®ã ãã©ãGAEã«å¼·ããããªäººããããªäººãéã¾ãã¡ã«ã«ãªè¬¹è£½ã®ã©ããã¼ãªã大ä¸å¤«ãªãã ãããã¨ãããã¨ã§ããã£ããã¯ããã使ã£ã¦éçºãé²ãã¦
https://github.com/Songmu/smartcache smartcacheã¨ããGoã®ã¤ã³ã¡ã¢ãªãã£ãã·ã¥ã©ã¤ãã©ãªãæ¸ããã ä¸è¬çã«ããã£ãã·ã¥ãå®è£ ããå ´å以ä¸ã®ãããªåé¡ãèµ·ãããã¡ã§ãã ãã£ãã·ã¥æ´æ°æã«ãªã¯ã¨ã¹ãã殺å°ãã¦ãã¾ã(ããããThundering Herdåé¡) ãã£ãã·ã¥çæã«æéããããå ´åããã£ãã·ã¥æ´æ°æã«å¦çããããã¯ãã¦ãã¾ã smartcacheã¯ä¸è¨ã®åé¡ã以ä¸ã®ã¢ããã¼ãã§è§£æ±ºãã¦ãã¾ãã ãã£ãã·ã¥æ´æ°å¦çãä¸æ¬åãã Goã®å ´å golang.org/x/sync/singleflight ã使ãã°ç°¡å! ãã£ãã·ã¥æéåãåã«å é¨çã«æ´æ°å¦çããããªã ããããããªãã§ããçãªå¦ç 使ãæ¹ ã³ã³ã¹ãã©ã¯ã¿ã«ãã£ãã·ã¥ã®å®éã®æå¹æéãsoftãªæå¹æéãããã¦ãã£ãã·ã¥çæé¢æ°ã渡ãã¾ãã // ã³ã³ã¹ãã©ã¯ã¿ ca :
One of the most interesting parts of Google is our fleet-wide continuous profiling service. We can see who is accountable for CPU and memory usage, we can continuously monitor our production services for contention and blocking profiles, and we can generate analysis and reports and easily can tell what are some highly impactful optimization projects we can work on. I briefly worked on Google Cloud
Writing a SQL database from scratch in Go: 1. SELECT, INSERT, CREATE and a REPL Next in database basics: 2. binary expressions and WHERE filters 3. indexes 4. a database/sql driver In this series we'll write a rudimentary database from scratch in Go. Project source code is available on Github. In this first post we'll build enough of a parser to run some simple CREATE, INSERT, and SELECT queries.
Go è¨èªã¯ struct ã®ã¬ã·ã¼ãããã¤ã³ã¿ã®å ´åã¯å®ä½ã§ãã£ã¦ããã¤ã³ã¿ã®å ´åã§ãã£ã¦ãå¼ã³åºããã®ã§ããã struct ãåç §ã«ã¦ã³ãã«å¾ãåä½ããæ§ãªå ´åã¯å®ä½ã§ã³ãã¼ããã¦ãã¾ã£ã¦ã¯å°ãå ´åãããã¾ããä¾ãã°ä»¥ä¸ã®æ§ãªã¤ã³ã¿ãã§ã¼ã¹ãèãã¾ãã package main import ( "fmt" "sync/atomic" "time" ) type foo struct { n int64 q chan struct{} } func (f *foo) Add() { if atomic.AddInt64(&f.n, 1) == 1 { f.q = make(chan struct{}) } } func (f *foo) Done() { if atomic.AddInt64(&f.n, -1) == 0 { f.q <- struct{}{} } } func (f
ã¯ããã« æ¬ç¨¿ã¯Go Advent Calendar 2019ã®25æ¥ç®ã®è¨äºã§ãã çè ã¯éç解æã大好ãã§ãªãªã¸ãã«ã®éç解æãã¼ã«ãä½ã£ãããéç解æãã¿ã§ç»å£ããããã¦ãã¾ãã https://github.com/gostaticanalysis https://github.com/gcpug/zagane Mercari Advent Calendar 2018ã®âGoã«ãããéç解æã®ã¢ã¸ã¥ã¼ã«åã«ã¤ãã¦âã¨ããè¨äºãã§æ¸ããããã«ãGoã®éç解æãã¼ã«ã¯åå©ç¨æ§ãèããã¢ã¸ã¥ã¼ã«åããæµãã«ãªã£ã¦ãã¾ãã æ¬ç¨¿ã§ã¯éç解æã®ã¢ã¸ã¥ã¼ã«åã«ããã課é¡ã¨ä»å¾ã®ã¨ã³ã·ã¹ãã ãèå¯ãã¾ãã éç解æã®ã¢ã¸ã¥ã¼ã«å ã¢ã¸ã¥ã¼ã«åã¯ãéç解æãã¼ã«ãgolang.org/x/tools/go/analysisããã±ã¼ã¸ï¼ä»¥ä¸ãanalysisããã±ã¼ã¸ï¼ã®Analyzeræ§é ä½ã®åä½
ãã®è¨äºã¯Qiita AdventCalendar 2019 Go6ã®17æ¥ç®ã®ã¨ã³ããªã§ãã ãTinyGoã§ãã¤ã³ã³éçºã«å ¥éãã¦ã¿ããï¼ãã¨ããå 容ã§ç¾ç¶ã®TinyGoããç´¹ä»ã TinyGoã£ã¦ï¼ Goã®ããã³ãã¨ã³ãã使ã£ã¦ããã¯ã¨ã³ãã«LLVMãå©ç¨ãã形㧠ãã¤ã³ã³ã«åãããã¤ããªãåºåå¯è½ã«ãããã®ã§ãã ç¹å¾´ Goã®ãã¤ã³ã³åããµãã»ãã AVRãARMã·ãªã¼ãºã«å¯¾å¿ WASMãPCåããã¤ããªãåºåå¯è½ LLVMããã¯ã¨ã³ãã®ããé«å¹çï¼ãµã¤ãºãå¦çæ§è½ï¼ ãªãGoã¯ãã¤ã³ã³ã«åããªãã®ãï¼ OSä¾åã大ããã¨ãã©ã³ã¿ã¤ã ã大ãããªã© ãããã¯ã¼ã¯ã©ã¤ãã©ãªãã¢ããªã·ãã¯ã§å·¨å¤§ ã¡ã¢ãªã®å©ç¨æ¹æ³ãå¯è±ªç çµè¾¼ã«å¿ è¦ãªGCã®ä¿çãvolatileæ©è½ã®ä¸è¶³ TinyGoããµãã¼ãããæ¨æºã©ã¤ãã©ãª ã¾ã ãæ¬å®¶Goã¨ã®å·®ç°ã¯ããã¤ãæ®ã£ã¦ãã¦ãã®å½±é¿ã§åæ°ã»ã©ã®ããã±ã¼ã¸ã¯
æ¬è¨äºã¯ Go Advent Calendar 2019 11 æ¥ç®ã®è¨äºã§ãã Go ã¯ã·ã³ãã«ãªè¨èªæ©è½ã»ã·ã³ã¿ãã¯ã¹ãç¹å¾´ã§ãããå½åè¦åã«ããã®ã·ã³ãã«ãã表ãã¦ãã¾ãã æ¬è¨äºã§ã¯ãå ¬å¼ãèå㪠Go ã¨ã³ã¸ãã¢ãOSS ãªã©ããè¦ããã Go ãããå½åè¦åãç´¹ä»ãã¾ãã ä»æ´ãªãã¼ãããããã¾ããããæå¤ã«ãå ¬ç§å ±ã ã§å½åè¦åãæèããã¦ããªãã³ã¼ããææè¦ãããã®ã§ãèªæãè¾¼ãã¦è¨ãã¾ãã 誤ã£ãå 容ãããã° Twitter ã§ãææããã ããã°ã¨æãã¾ãã ããã±ã¼ã¸åç°¡æ½ã«ããEffective Go ã§ã¯ãshort, concise, evocative ãªããã±ã¼ã¸åãæã¾ããã¨ããã¾ãã ããã¯ããã±ã¼ã¸åã«éããã»ã¨ãã©ããããå½åã«ããã¦å½¹ç«ã¤æéã ã¨æãã¾ãã ã¾ãããããã±ã¼ã¸åã¯ä¸è¨ã§ä½ããããã表ãã¨ã¬ãã¼ã¿ã¼ãããã ãã¨ãã Dave Cheney
ãã¡ãã¯Gunosyã®ã«ã¬ã³ãã¼ | Advent Calendar 2019 - Qiita7æ¥ç®ã®è¨äºã§ããæ¨æ¥ã®è¨äºã¯ id:tmotegi ããã«ããçªæï¼é£ã®ãã¼ãã¼ã Gunosy 2019 - Gunosy Tech Blogã§ããã Merry Christmas! ããã«ã¡ã¯ãä»å¹´3æã«å ¥ç¤¾ããLUCRAäºæ¥é¨ã®å¹³ç°(slackã§ã¯hirarin)ã§ãããã¼ã ã§ã¯ãµã¼ãã¼ãµã¤ãã¨ã³ã¸ãã¢ã¨ãã¦æ¥ã Goãæ¸ãã¦ãã¾ãã Gunosyå ¥ç¤¾åã¯PHPãAWSå¨è¾ºãä¸å¿ã«è§¦ã£ã¦ãã¾ããããã®ãããGoãæ¥åã¨ãã¦æ¸ãå§ããã®ã¯å ¥ç¤¾ãã¦ããã«ãªãã¾ãã ãã®è¨äºã¯? ãã®è¨äºã§ã¯Gunosyã§æ°ç±³Gopherã¨ãã¦ï¼ã ãããï¼1å¹´ãã©ã®ããã«éããã¦ããããæ¯ãè¿ããã¨æãã¾ãã ããããGoããã£ã¦ããããã¾ãã¯æãã¦ãããã¨æã£ã¦ãã人ã®åèã«ãªãã°å¬ããã§ãã æ¥åã§ã®Go
ãã®è¨äºã¯Tech KAYAC Advent Calendar 2019ã®3æ¥ç®ã®è¨äºã§ãã æ°åãµã¼ããµã¤ãã¨ã³ã¸ãã¢ã®å®®æ ç´ èã§ãï¼ æ®æ®µã¯Goã§ã²ã¼ã ãµã¼ããã´ãªã´ãªæ¸ãã¦ãã¾ãã ã¯ããã« Goã«ã¯Embeddingã¨å¼ã°ããæ©è½ãããã¾ãï¼æ¥æ¬èªã§ã¯ãåãè¾¼ã¿ãã¨æ¸ããããã¨ãå¤ãã¨æãã¾ããããã®è¨äºã§ã¯Embeddingã¨è¨è¿°ãã¾ãï¼ããã®Embeddingã¯ä¾¿å©ã§ãããè¤æ°ã®æ§é ä½ã使ã£ã¦Embeddingããéã«ååã®ãã£ã¼ã«ããåå¨ãããã¨æãã¬ç½ ã«ãããã¾ãï¼ç§ã¯æè¿ããã£ãç¬ï¼ãããã£ãããã«ã¯ãã¿ã«ããã°ï¼ã¨ãããã¨ã§æ¸ãã¦ããã¾ãï¼ï¼ Embedding ååãã£ã¼ã«ããæ示çã«åç § ã¾ãEmbeddingãã¦åãè¾¼ãã æ§é ä½ã®ãã£ã¼ã«ããåç §ãã¦ã¿ã¾ãããã以é㯠S1 S2 Embedding æ§é ä½ãåæã«èª¬æãã¾ãããªã説æã®ããã«ãã㦠Duplic
å æ¥ãGopls ã® v0.2.0 ããªãªã¼ã¹ããã¾ããã v0.2.0 https://github.com/golang/go/issues/33030#issuecomment-549629508 ãªãªã¼ã¹ãã¼ãã«æ¸ããã¦ãã¾ããããã®ãã¼ã¸ã§ã³ãã completeUnimported ã«å¯¾å¿ãã¦ãã¾ããfmt ã import ããã¦ããªãã¦ã fmt.Println ãè£å®ã§ããæ§ã«ãªãã¾ãããã ãããã©ã«ãã§ã¯ç¡å¹ã«ãªã£ã¦ãã¾ããVisual Studio Code ã§ããã°ä»¥ä¸ã settings.json ã«å«ããäºã§ä½¿ããæ§ã«ãªãã¾ãã "gopls": { "completeUnimported": true }, ã¾ã vim-lsp ãã使ãã§ããã°ä»¥ä¸ã®æ§ã«è¨å®ããäºã§ä½¿ããæ§ã«ãªãã¾ãã if executable('gopls') augroup LspGo
Styles are the conventions that govern our code. The term style is a bit of a misnomer, since these conventions cover far more than just source file formattingâgofmt handles that for us. The goal of this guide is to manage this complexity by describing in detail the Dos and Don'ts of writing Go code at Uber. These rules exist to keep the code base manageable while still allowing engineers to use G
ãç¥ãã
é害
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}