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
この記事は KLab Advent Calendar 2015 の18日目の記事です。 Go 言語のランタイムは CPU プロファイル以外にも幾つかのプロファイルを標準で実装していますが、あまり Web 上に実用的な情報がありません。 そこでこの記事では、実際に Go で長期間稼働するサーバーを開発する上で役に立った CPU 以外のプロファイル機能を紹介することにします。 スタックダンプ /debug/pprof/goroutine で、現時点での全 goroutine のダンプを取得できます。 これは go tool pprof でも利用できますが、実際に使うときはそれよりも curl や wget などを使って /debug/pprof/goroutine?debug=1 をプレインテキスト形式で保存します。 例えば、次のプログラムのスタックダンプを取得してみます。 package m
When writing an HTTP server or client in Go, timeouts are amongst the easiest and most subtle things to get wrong: there’s many to choose from, and a mistake can have no consequences for a long time, until the network glitches and the process hangs. HTTP is a complex multi-stage protocol, so there's no one-size fits all solution to timeouts. Think about a streaming endpoint versus a JSON API versu
You can find (just about) anything on Medium — apparently even a page that doesn’t exist. Maybe these stories will take you somewhere new?
THIS BLOG POST IS VERY OLD NOW. YOU PROBABLY DON'T WANT TO USE THE TECHNIQUE DESCRIBED HERE. GO'S sync.Pool IS A BETTER WAY TO GO. The other day I wrote about our use of Lua to implement our new Web Application Firewall. The other language that's become very popular at CloudFlare is Go. In the past, I've written about how we use Go to write network services including Railgun. One of the operationa
package main import "github.com/gobwas/glob" func main() { var g glob.Glob // create simple glob g = glob.MustCompile("*.github.com") g.Match("api.github.com") // true // quote meta characters and then create simple glob g = glob.MustCompile(glob.QuoteMeta("*.github.com")) g.Match("*.github.com") // true // create new glob with set of delimiters as ["."] g = glob.MustCompile("api.*.com", '.') g.Ma
Introduction to Go 1.7 The latest Go release, version 1.7, arrives six months after 1.6. Most of its changes are in the implementation of the toolchain, runtime, and libraries. There is one minor change to the language specification. As always, the release maintains the Go 1 promise of compatibility. We expect almost all Go programs to continue to compile and run as before. The release adds a port
This article was originally published on Matt Silverlock's personal site, and with their permission, we are sharing it here for Codeship readers. You're building a web (HTTP) service in Go, and you want to unit test your handler functions. You've got a grip on Go's net/http package, but you're not sure where to start with testing that your handlers return the correct HTTP status codes, HTTP header
プログラミング言語Go 作者: Alan A.A. Donovan出版社/メーカー: 丸善出版発売日: 2016/06/15メディア: 単行本(ソフトカバー) 2015年4月20日から原著の原稿のレビューを始めて、レビューが終わったのが2015年9月5日でした。その間に、二回読み返しています。翻訳は2015年9月13日に着手し始めて、私のすべての作業が昨日(2016年5月8日)終了しました。今日、入稿となり印刷所での印刷の準備が始まりますので、予定通り6月15日刊行となります。 今回は、原著のレビューに98時間、翻訳に473時間を費やしたことになります。ちなみに『APIデザインの極意』は、翻訳だけでしたが500時間を費やしています。これは、私が私的時間に費やした時間であり、出版社の担当者やレビューアによるレビューを加えると多くの時間が費やされたことになります。また、社内のGo言語研修では翻
最近マスタリングTCP/IP SSL/TLS編や暗号技術入門を読んでいた.理解を深めるためにGo言語で標準のcryptoパッケージを触り/実装を読みながら読んだ. cryptoパッケージは他の標準パッケージと同様に素晴らしい.Go言語にはどのような暗号化手法が実装されているのか実例を含めてざっとまとめる.なお本文に書ききれなかったものを含め全ての実装例はtcnksm/go-cryptoにある. 共通鍵暗号 まずは共通鍵暗号をみる.共通鍵暗号は暗号化と復号化に同じ鍵を用いる暗号化方式である.共通鍵暗号はブロック暗号とストリーム暗号の2種類に分けることができる.ブロック暗号は特定の長さ単位で暗号化を行う方式であり,ストリーム暗号はデータの流れを順次処理していく方式である. Go言語にはブロック暗号としてDES(Data Encryption Standard),DESを繰り返すtriple-D
(This article was originally a talk at QCon London 2016. Video and slides here.) In 2014, I gave a talk at the inaugural GopherCon titled Best Practices in Production Environments. We were early adopters at SoundCloud, and by that point had been writing, running, and maintaining Go in production in one form or another for nearly 2 years. We had learned a few things, and I tried to distill and conv
Go 言語の vendoring ツールとして Glide を使い始めました。 Masterminds/glide: Package Management for Golang vendoring とは vendoring とは、アプリケーションが依存する 3rd-Party パッケージ/ライブラリのソースコードそのものを自身のレポジトリに含めて管理する試みのこと、を指す用語の模様です(たぶん)。 Node.js における package.json に依存関係が書かれている状態だけでは vendoring ではないです。node_modules ディレクトリ自体をレポジトリの管理対象に含めることで vendoring ができている状態、と言えるようになります。 Node.js (というか npm) に限らず、node_modules 的な役割のディレクトリは .gitignore で無視す
Enter the go get path to the project below: Generate Report Sponsored Report Cards github.com/mergestat/mergestat github.com/photoprism/photoprism [Your Repo Here!] Recently Generated github.com/willoma/defaults github.com/wafer-bw/go-toolbox/rfc9457 github.com/indiependente/pveidmapper github.com/Achsion/iso8601 github.com/USA-RedDragon/aredn-manager
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く