proxy.golang.org : github.com/mattn/cmd
Package cmd provides a framework that helps implementation of commands having these features: Better logging: By using github.com/cybozu-go/log package, logs can be structured in JSON or logfmt format. HTTP servers log accesses automatically. Graceful exit: The framework provides functions to manage goroutines and network server implementation that can be shutdown gracefully. Signal handlers: The framework installs SIGINT/SIGTERM signal handlers for graceful exit, and SIGUSR1 signal handler to reopen log files. Environment is the heart of the framework. It provides a base context.Context that will be canceled before program stops, and methods to manage goroutines. To use the framework easily, the framework provides an instance of Environment as the default, and functions to work with it. The most basic usage of the framework. HTTP server that stops gracefully.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/mattn/cmd
License: MIT
Latest release: over 8 years ago
First release: over 8 years ago
Namespace: github.com/mattn
Stars: 2 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 6 days ago