diff options
author | Keuin <[email protected]> | 2023-07-01 21:52:08 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2023-07-01 21:52:27 +0800 |
commit | 40e0b3172af1e8deab80a7bf2bf95337ef9201c6 (patch) | |
tree | 2b99c5028a1b799d0887f028351bde3560f72d5c /main.go | |
parent | 6c3c988bae6f8a78afd3503743106395792ee2b0 (diff) |
Refactor: replace homemade result handling with library.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -14,6 +14,7 @@ import ( "github.com/keuin/slbr/logging" "github.com/keuin/slbr/recording" "github.com/mitchellh/mapstructure" + "github.com/samber/mo" "github.com/spf13/viper" "log" "os" @@ -131,7 +132,7 @@ func getTasks() (tasks []recording.TaskConfig) { // generate task list from cli taskCount := len(*rooms) tasks = make([]recording.TaskConfig, taskCount) - saveTo := common.Zeroable[string](*saveToPtr).OrElse(".") + saveTo := mo.EmptyableToOption(*saveToPtr).OrElse(".") diskBufSize := uint64(*diskBufSizePtr) if *diskBufSizePtr <= 0 { diskBufSize = defaultDiskBufSize |