- 授权协议: MIT
- 开发语言: Google Go
- 操作系统: 跨平台
- 软件首页: https://github.com/visionmedia/go-debug
- 软件文档: https://github.com/visionmedia/go-debug/blob/master/Readme.md
- 官方下载: https://github.com/visionmedia/go-debug
软件介绍
go-debug 是一个用于条件调试日志记录(Conditional debug logging)的 Go 语言库。
示例代码:
代码示例
package main
import . "github.com/tj/go-debug"
import "time"
var debug = Debug("single")
func main() {
for {
debug("sending mail")
debug("send email to %s", "tobi@segment.io")
debug("send email to %s", "loki@segment.io")
debug("send email to %s", "jane@segment.io")
time.Sleep(500 * time.Millisecond)
}
}如果使用 DEBUG=* 环境变量运行程序,将看到:
15:58:15.115 34us 33us single - sending mail 15:58:15.116 3us 3us single - send email to tobi@segment.io 15:58:15.116 1us 1us single - send email to loki@segment.io 15:58:15.116 1us 1us single - send email to jane@segment.io 15:58:15.620 504ms 504ms single - sending mail 15:58:15.620 6us 6us single - send email to tobi@segment.io 15:58:15.620 4us 4us single - send email to loki@segment.io 15:58:15.620 4us 4us single - send email to jane@segment.io 15:58:16.123 503ms 503ms single - sending mail 15:58:16.123 7us 7us single - send email to tobi@segment.io 15:58:16.123 4us 4us single - send email to loki@segment.io 15:58:16.123 4us 4us single - send email to jane@segment.io 15:58:16.625 501ms 501ms single - sending mail 15:58:16.625 4us 4us single - send email to tobi@segment.io 15:58:16.625 4us 4us single - send email to loki@segment.io 15:58:16.625 5us 5us single - send email to jane@segment.io
Inside Larry's and Sergey's Brain
Richard Brandt / Portfolio / 17 Sep 2009 / USD 24.95
You’ve used their products. You’ve heard about their skyrocketing wealth and “don’t be evil” business motto. But how much do you really know about Google’s founders, Larry Page and Sergey Brin? Inside......一起来看看 《Inside Larry's and Sergey's Brain》 这本书的介绍吧!
