Akihiro KuwanoExperienced server engineer, Solution Architect of cloud computing at Amazon Web Services Japan
Does Go runtime maintain the iteration orders for maps? No. Go 1 specification says the iteration order over a map is not specified and is not guaranteed to be the same from one iteration to the next. For the standard Go compiler, the map iteration orders are always partially randomized to varying extent. If you require a stable iteration order for a map you must maintain the order by yourself. Pl
Having seen the cool things it’s now possible to do using using Google BigQuery’s public data sets (notably this), I decided to take a look at the top imported golang packages on a weekly basis. Interested in finding the best logging solution for your go application? or perhaps you want to make sure you are using the right HTTP request multiplexer? What better way is there than good old democracy!
はじめに Golangで大きなcsvファイルをパースして諸々の処理をしてインポートをする処理を書いていたのですが、明らかに遅く5分以上かかる処理になっていました。 そこでgoルーチンを導入して並列で実行することによって効率化を図りました。 対応前 func main() { // 1度に取得する量 bulkCount := 100 file, _ := os.Open("./data.csv") defer file.Close() reader := csv.NewReader(file) // ヘッダー行の取得 header, _ := reader.Read() for { lines := make([][]string, 0, bulkCount) isLast := false for i := 0; i < bulkCount; i++ { line, err := read
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く