Skip to content

Commit

Permalink
mktemp: simplify file path parameter logic
Browse files Browse the repository at this point in the history
Simplify the logic of computing the file path parameters (the
directory, prefix, suffix, and number of random characters) for the
temporary file created by `mktemp`. This commits adds an `Options`
struct as a layer of indirection between the application logic and
`clap`, and a `Params` struct whose associated function is responsible
for determining the file path parameters from the `Options`. This is
an improvement because the previous code had some logic for
determining file path parameters in one place and some in another
place.
  • Loading branch information
jfinkels committed May 28, 2022
1 parent 7861cc9 commit e3b6348
Showing 1 changed file with 209 additions and 170 deletions.
Loading

0 comments on commit e3b6348

Please sign in to comment.