示例#1
0
func main() {
	// Parse args to configuration.
	if cfg := config.Parse(os.Args); cfg != nil {

		// Start server with configuration.
		server.Start(cfg)
	}
}
示例#2
0
func main() {
	// Set `server.Formatter` to your Custom formatter.
	server.Formatter = new(Custom)

	// This is from sns2hipchat's main.go...
	//
	// Parse args and environment vars to configuration.
	if cfg := config.Parse(os.Args); cfg != nil {

		// Start server with configuration.
		server.Start(cfg)
	}
}