INNER CODE UNIT · Go
main
lucagrulla/cw · main.go:347
func main() {
ctx := kong.Parse(&cli,
kong.Vars{"now": time.Now().UTC().Add(-45 * time.Second).Format(timeFormat), "version": version},
kong.UsageOnError(),
kong.Name("cw"),
kong.Description("The best way to tail AWS Cloudwatch Logs from your terminal."))
debugLog := log.New(io.Discard, "cw [debug] ", log.LstdFlags)
if cli.Debug {
debugLog.SetOutput(os.Stderr)
debugLog.Println("Debug mode is on. Will print debug messages to stderr")
}
if !cli.NoVersionCheck {
defer newVersionMsg(version, fetchLatestVersion())
go versionCheckOnSigterm()
}