You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Golang ã§ã¢ãã¡ã¼ã·ã§ã³ GIF ãä½ãæé ã 3 éãç´¹ä»ãã¾ãã ãã¬ã¼ã ãã¨ã®ç»åããçæ ãããªããçæ Go è¨èªã§æåããçæ ãã¬ã¼ã ãã¨ã®ç»åããçæ ãã㪠GIF ç»åããã£ãã¨ãã¾ã (ãã ããæå)ã å¤æçµæã¯ãããªæãã çæããããã®ã³ã¼ãã¯ãããªæãã package main import "image" import "image/gif" import "os" func main() { files := []string{"g1.gif", "g2.gif","g3.gif", "g2.gif"} // åãã¬ã¼ã ã®ç»åã GIF ã§èªã¿è¾¼ã㧠outGif ãæ§ç¯ãã outGif := &gif.GIF{} for _, name := range files { f, _ := os.Open(name) inGif, _ := gi
ã³ãã³ãã©ã¤ã³ãã¼ã«ãæ¸ãã¨ãã«ãããã³ãããåºããããªããã¨ããã¾ãããï¼ãã ãã¡ããã¨ããã³ãããåºãã®ã¯æ¡å¤é£ããã£ããããã¾ããä¾ãã°ä»¥ä¸ã®æ§ãªè¦æ±ãããããã§ãã èªååã®å¦¨ãã«ãªãããã¿ã¼ããã«ãããªãæã¯ã¹ããããã¦æ¬²ãã ã¨ã«ããç°¡åã«ããã³ããã表示ãããã ãã¹ã¯ã¼ãå ¥åã§ã¯å ¥åãé ããã è¤æ°ã®é¸æè¢ããä¸æããã¨é¸æãããã åã«(y/n)ã ãå ¥åãããã ã¨ãããã¨ã§æ¸ããã®ããã¡ãã https://github.com/Songmu/prompter 以ä¸ã®ããã«ãããããã®è¦æ±ãç°¡åã«è§£æ±ºã§ãã¾ãã var twitterID string = prompter.Prompt("Enter your twitter ID", "default") var passwd string = prompter.Password("Enter your passwo
ããã§ã¯ãç§ããã©ãã¤ããæåã®ããæ¹ãç´¹ä»ãã¾ããããå人çã«éå»æ°å¹´ã«ããã£ã¦å¤§éã®Goã³ã¼ãã¨ä»ãåã£ã¦ããçµé¨ããéãããã®ã§ãããããã¯å ¨ã¦é常ã«ã¹ã±ã¼ã©ããªãã£ãããã¨æã£ã¦ãã¾ããç§ããã¹ã±ã¼ã«ãããã¨è¨ãã¨ãã¯æ¬¡ã®ãããªæå³ãããã¾ãã ã¢ããªã±ã¼ã·ã§ã³ãæ±ããç°å¢ã¯ãã¢ã¸ã£ã¤ã«ç°å¢ã®ä¸ã§å¤åãã¦ããã¾ããéçºã®3ã4ãæå¾ã«ãå ¨ã¦ããªãã¡ã¯ã¿ãªã³ã°ããå¿ è¦ãåºã¦ãããªã©ãèãããããªãã¯ãã§ããæ°ããæ©è½ã¯ç°¡åã«è¿½å ã§ããªãã¦ã¯æå³ãããã¾ããã ããªãã®ã¢ããªã±ã¼ã·ã§ã³ã¯å¤ãã®äººã ã«ãã£ã¦éçºããã¾ããå¯èªæ§ãé«ããç¶æãããããã®ã§ãªãã¦ã¯ãªãã¾ããã ããªãã®ã¢ããªã±ã¼ã·ã§ã³ã¯å¤§å¢ã®äººã ã«ä½¿ããã¾ãããã°ã¯å®¹æã«ç¹å®ã§ããä¿®æ£ã§ããªãã¦ã¯ãªãã¾ããã é·æçã«ã¿ãã¨ãããã®ãã¨ãéè¦ã«ãªããã¨ãããã¨ãç§ã¯ä»ã¾ã§ã«å¦ãã§ãã¾ãããå°ããªãã¨ã§ãã£ã¦ããå¤æ°ã«å½±é¿ãã¾
å ãã¿ã¯ãã¡ãã®ããã°ï¼ 50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs ãã¾ãã«ãè¡æçã§ããï¼HTTP Response ã® Body ãéããã¨ãï¼ãã¶ãï¼ã¿ããªããæ¸ãã¦ãã¨æããã ãã©ï¼ 誤ï¼ã¨ã©ã¼ããªãããã§ãã¯ãã¦ããéããããã«ãã¦ãã resp, err := http.Get("http://golang.org") if err != nil { return err } defer resp.Body.Close() ã¨ã©ã¼ããã£ã¦ãï¼Response ã nil ãããªãã¨ãããããããï¼ãªã®ã§ï¼æ£ããéãæ¹ã¯ããï¼ æ£ï¼Response ã nil ãããªãã£ããéããããã«ãã¦ããã¨ã©ã¼ããã§ãã¯ãã resp, err := http.Get("https://
« Protocol Buffers ãå©ç¨ãã RPCãgRPC ã golang ãã試ãã¦ã¿ãã | Main | Vim ä¸ã®ãã¡ã¤ã©ã NERDTree ãã dirvish ã«ä¹ãæããã » å æ¥ãGoogle ãéçºãã¦ãããªã¢ã¼ãããã·ã¼ã¸ã£ã³ã¼ã«ãgRPC ã golang ãã使ããã¥ã¼ããªã¢ã«ãæ¸ãã¾ããã Big Sky :: Protocol Buffers ãå©ç¨ãã RPCãgRPC ã golang ãã試ãã¦ã¿ãã http://mattn.kaoriya.net/software/lang/go/20150227144125.htm ä»æ¥ã¯ ruby 㨠C++ ãã触ã£ã¦ã¿ããã¨æãã¾ããã¯ããã« ruby ã®æ¹ã§ãããRuby 2.2.0 ã§ãã«ãããäºãåºæ¥ã¾ãããã©ããã¦ã Ruby 2.2.0 ãã試ããã人ã¯ã以ä¸ã® PR ã«ããããããé©
ã¿ã¤ãã«ã®éãã§ããGo 㯠LL çã«ä½¿ãããã¨ã¯ããç³ãã¾ãããããããæèã§ä½¿ã£ã¦ãã㨠REPL çãªãã¨ããããã¨ãã«å°ããã¡ã§ããããããã§ä½ãã¾ãããgoreãããååã§ããã motemen/gore · GitHub 以ä¸ã®ã¹ã¯ãªã¼ã³ãã£ã¹ãã§ã ãããã®é°å²æ°ããå¯ãä¸ããã ï¼ã¹ã¯ãªã¼ã³ãã£ã¹ã㯠cho45/KeyCast ã使ã£ã¦æ®å½±ãã¾ããï¼ ç¹å¾´ gore ã®ç¹å¾´ã¯ä»¥ä¸ã®éãã§ãã ã©ã¤ã³ã¨ãã£ã¿ã¨å±¥æ´ è¤æ°è¡å ¥å ããã±ã¼ã¸ã®ã¤ã³ãã¼ããè£å®ã¤ã å¼ããã³æãå®è¡å¯è½ ã³ã¼ãè£å®ï¼nsf/gocode ãå©ç¨ï¼ ããªãã£ããªã³ãï¼k0kubun/pp ã davecgh/go-spew ãããããï¼ ããã¥ã¡ã³ããå¼ããï¼godoc ãå¿ è¦ï¼ 以ä¸ã®ããã«ãé常ã«ä¾¿å©ãªãã®ã«ãªã£ã¦ããã¾ããããããã®ç¨åº¦ REPL ã«ã¯å½ç¶ãã£ã¦ã»ããæ©è½ã ã¨ãè¨ããã ã¤ã³
Goã§JSONããã¼ã¹ããã¨ãã«ãããããèããã®ã ãã© ãã¡ãã¨ãã£ã¦ããã¨ãã©ããã¦ããã¾ãå®è£ ã§ããªããªã£ã¦å°ã£ã¦ããã¨ãã話ã å ã«æ¸ãã¦ããã¾ãããçµè«ã¯ãªãã§ãã JSONããã¼ã¹ããã¨ãã®åé¡ ãããããJSONãç°¡åã«åãæ±ãå¿ è¦ããªãããã®ããã«ã¤ãã¦ã æ¨æºã§ã¯ãJSONããã¼ã¹ããå ´å json.Unmarshalã使ã£ããjson.NewDecoderã使ã£ããããã ä¾ãã°ãUseræ§é ä½ã« type User struct { Name string Age uint16 } func main() { var jsonStr = `{ "Name": "Ken", "Age": 24 }` var u User json.Unmarshal([]byte(jsonStr), &u) fmt.Println(u) // {Ken 24} } ä¸ã®å ´åãJSONã®
ä»ã¯ä¼æ¥å ã«ããã¦ããã¼ã¸ã§ã³ç®¡çã§Gitã使ãæãå¢ãã¦ãã¾ããå人å人ããªãã¸ããªãæã¤ãã¨ã§ãªãã©ã¤ã³ã§ãéçºãã¹ã ã¼ãºã«é²ããããããå¤æ°ã®é¢é£ãã¼ã«ã®ç»å ´ã«ãã£ã¦çç£æ§ãåä¸ãã¦ãã¾ãã GitHubãBitBucketã®ãããªGitãªãã¸ããªãµã¼ãã¹ãããã¾ãããä¼æ¥å é¨ã§ãªãã¸ããªãæã¡ããã¨ããã±ã¼ã¹ãå¤ãã§ããããããã§ä½¿ã£ã¦ã¿ããã®ãGogsã§ãã Gogsã®ä½¿ãæ¹ Gogsã¯GitHubãå¼·ãæèããUIã«ãªã£ã¦ãã¾ãã®ã§ãæ¢ã«GitHubã使ã£ã¦ããæ¹ã§ããã°ããã«ä½¿ããããã«ãªãã¨æãã¾ãã社å ãèªç¤¾ãµã¼ãã«Gitãªãã¸ããªãµã¼ããç«ã¦ããæã«é¸æè¢ã®ä¸ã¤ã«èãã¦ã¿ã¦ãã ããã Gogsã¯Go製ãBSD Licenseã®ãªã¼ãã³ã½ã¼ã¹ã»ã½ããã¦ã§ã¢ã§ãã Gogs: Go Git Service - A self-hosted Git service writte
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
golang 㧠net/http ã¨ã£ã¦ã㦠JSON ã parse ãã¦æå®ã®ãã¼ãåãåºãããã°ã©ã ãæ¸ãããã£ã。 ããããå ´å、JSONPath ã¨ã使ã£ã¦æ¸ãããã®ã ã、JSONPath ãå®å ¨ã«ãµãã¼ãããã¦ãã go ã®ã©ã¤ãã©ãªã¯è¦å½ãããªãã¦ï½¤mattn_jp ããã JSONPath æ¸ããã¨ãã¦éä¸ã§ããã gist ãã²ã£ããã£ã¦ããç¨åº¦ï½¡ãã¨ãªãã yasuyuky/jsonpath ã¨ããã®ãããã®ã ã、ããã¯ãããã JSONPath ã§ã¯ãªã。 JSONPath ãªãã¦ãã¸ä¸ä¾¿ã¤ã³ã±ï½¤ã¨æã£ã¦ããã、mattn_jp ããã go-scan ã¨ããã©ã¤ãã©ãªãæ¸ãã¦ãã。 golangã®jsonãåãä½ããmap[string]interface{}ã«ãã¦ãã£ã¹ããããããªãã¦æåã¯golangé¢åèããªã£ã¦æã£ã¦ããã©å°è¦æ¨¡ãªãå¾è ã§ååã ããã以ä¸ã®
é«éã«Goè¨èªã®CLIãã¼ã«ãã¤ããcli-initã¨ãããã¼ã«ãã¤ãã£ã tcnkms/cli-initã»GitHub cli-initã使ãã°ï¼Goè¨èªã³ãã³ãã©ã¤ã³ãã¼ã«ä½ææã®ã決ã¾ããã¿ã¼ã³ããã³ãã¬ã¼ãã¨ãã¦èªåçæãï¼ã³ã¢æ©è½ã®è¨è¿°ã«éä¸ãããã¨ãã§ããï¼ ã㢠以ä¸ã¯ç°¡åãªåä½ä¾ï¼ ä¸ã®ãã¢ã§ã¯ï¼addã¨listï¼deleteã¨ãããµãã³ãã³ãããã¤todoã¢ããªã±ã¼ã·ã§ã³ãçæãã¦ããï¼çæçµæã¯ï¼tcnksm/sample-cli-initã«ããï¼ èæ¯ Goè¨èªã§ä½ãããã³ãã³ãã©ã¤ã³ãã¼ã«ãè¦ã¦ããã¨ï¼codegangsta/cliã¨ããããã±ã¼ã¸ããã使ããã¦ããï¼ ããã¯ï¼ã³ãã³ãã©ã¤ã³ãã¼ã«ã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ãå®ç¾©ããããã®ã©ã¤ãã©ãªã§ï¼ããã使ãã°ï¼ãµãã³ãã³ãããã¤ã³ãã³ãã©ã¤ã³ãã¼ã«ãç°¡åã«ã¤ãããã¨ãã§ããï¼Usageãèªåã§çæãã¦ããããï¼bash
Andrew Gerrand 18 June 2014 Today we are happy to announce the release of Go 1.3. This release comes six months after our last major release and provides better performance, improved tools, support for running Go in new environments, and more. All Go users should upgrade to Go 1.3. You can grab the release from our downloads page and find the full list of improvements and fixes in the release note
Iâve been looking for an excuse to try Martini ever since it was announced on the golang-nuts mailing list. Martini is a Go package for web server development that skyrocketed to close to 2000 stars on GitHub in just a few weeks (the first public commit is a month old). So I decided to build an example application that implements a (pragmatic) RESTful API, based on mostly-agreed-upon best practice
Rebuild A Podcast by Tatsuhiko Miyagawa. Talking about Tech, Software Development and Gadgets. 0:00 miyagawa: ä»æ¥ã§2åç®ã ãããããåºã¦ãããã®ã lestrrat: 2åç®ã§ããã miyagawa: lestrrat ãããã¨ãç§ããã§ãã lestrrat: ç§ã§ãããããããé¡ããã¾ãã miyagawa: ç§ããã¨ããã°ãååºã¦ããã£ãã¨ãã Perl ã®é¢ä¿ã® YAPC ã¨ãã§ã馴æã¿ã ã¨æããã§ããã©ãæè¿ãGitHub ã¨ã Twitter ã¨ãã®æ´»åç¶æ³è¦ã¦ãã¨ãå¥ã®ãã¨ããã£ã¨ãã£ã¦ããããªé°å²æ°ãããããã£ã¦ã§ãããããã¯ä½ãã¨ããã¨ãGoãGolang ã§ãããã§ãçµæ§ãã®è¾ºã®è©±ãä»ã®ã²ã¹ããä¾ãã° typester ããã®ã¨ãã¨ãã«ã¡ããã£ã¨è©±ããããã
// ã¢ã¯ã»ã¹ãã¼ã¯ã³åå¾æã®å type AccessTokenMessage struct { TokenType string `json:"token_type"` AccessToken string `json:"access_token"` ExpiresIn string `json:"expires_in"` Scope string `json:"scope"` } // ã¢ã¯ã»ã¹ãã¼ã¯ã³åå¾æã®ãã£ãã·ã¥å type AccessTokenMessageCache struct { accessTokenMessage AccessTokenMessage updateTime time.Time } func (self *AccessTokenMessageCache) loadNewAccessTokenMessage() { resp, err := http
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}