CoderDojoのhttp://coderdojo.com/about-us/の日本語訳です。 最初の一文の翻訳が特に難しい・・・
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # I don't know about Windows | |
| BUILD_TMP_PATH = /tmp/coderdojo-build-tmp | |
| all: | |
| # some build stuff | |
| build: all | |
| @wget -nH -r -P $(BUILD_TMP_PATH) http://localhost:3000 | |
| @rsync -avz ./public/* $(BUILD_TMP_PATH) | |
| @make clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "os" | |
| "log" | |
| ) | |
| func open(name string, ch chan []byte, errch chan error) { | |
| file, err := os.Open(name) | |
| if err != nil { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "time" | |
| "sync" | |
| ) | |
| const NUM = 2 | |
| var finished = make(chan bool, NUM) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| ) | |
| type Manager struct { | |
| doers []Doer | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package simplemap | |
| import ( | |
| "sync" | |
| ) | |
| type Data struct { | |
| i map[string] int | |
| im sync.RWMutex | |
| f map[string] float64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "log" | |
| "encoding/json" | |
| ) | |
| type Hoge struct { | |
| Name string `json:"name"` | |
| Body map[string]interface{} `json:"body"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "log" | |
| ) | |
| func main() { | |
| // JSON wrapping test | |
| var data struct { |