summaryrefslogtreecommitdiff
path: root/recording
diff options
context:
space:
mode:
authorKeuin <[email protected]>2023-07-01 22:02:01 +0800
committerKeuin <[email protected]>2023-07-01 22:02:01 +0800
commit5aba05d7237c2250e647a717f8abef658f30a9e9 (patch)
tree6fe77f8a9e4b043365bbc993990cdf2a34447039 /recording
parent40e0b3172af1e8deab80a7bf2bf95337ef9201c6 (diff)
Refactor: replace homemade error type checking with idiom Go practices.
Diffstat (limited to 'recording')
-rw-r--r--recording/runner.go2
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 {