diff options
author | Keuin <[email protected]> | 2023-07-01 22:02:01 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-01 22:02:01 +0800 |
commit | 5aba05d7237c2250e647a717f8abef658f30a9e9 (patch) | |
tree | 6fe77f8a9e4b043365bbc993990cdf2a34447039 /recording/runner.go | |
parent | 40e0b3172af1e8deab80a7bf2bf95337ef9201c6 (diff) |
Refactor: replace homemade error type checking with idiom Go practices.
Diffstat (limited to 'recording/runner.go')
-rw-r--r-- | recording/runner.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recording/runner.go b/recording/runner.go index 4145d5f..8f892fa 100644 --- a/recording/runner.go +++ b/recording/runner.go @@ -323,7 +323,7 @@ func record( logger.Info("Recording live stream to file \"%v\"...", filePath) return }, writeBufferSize) - if common.IsErrorOfType(err, &common.UnrecoverableTaskError{}) { + if _, ok := err.(*common.UnrecoverableTaskError); ok { logger.Error("Cannot record: %v", err) return err } else if errors.Is(err, context.Canceled) || err == nil { |