mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-03-12 13:42:26 -04:00
LogOptions.RunLogs unfortunately registers a signal handler and calls os.Exit(1) after finished processing when a signal is received. This makes it basically impossible to call that function from any custom code. This patch adds RunLogsContext, which does exactly what RunLogs does, but the context to be used is passed in. RunLogs retains the current contract, but it uses RunLogsContext internally, then calls os.Exit(1) when a signal is received. Kubernetes-commit: cc4666cc94be41d8b4558122717a2da9fb5a7b1a |
||
|---|---|---|
| .. | ||
| logs.go | ||
| logs_test.go | ||