- util/cli.go: RunMark() now maps CLI flags into mark.Config and
delegates to mark.Run(); all core processing logic removed
- util/cli_test.go: absorb Test_setLogLevel from deleted main_test.go
- main.go, main_test.go: removed (entry point is now cmd/mark/main.go)
- Makefile: update build target to ./cmd/mark with -o mark
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The D2Scale property of MarkConfig was never initialized, leading to a
default value of 0 being passed to the D2 renderer. This eventually led
to calling chromedp.ScreenshotScale with a scale value of 0. Chrome
doesn't like this, and never finishes the sceenshot operation.
Fixes#610
Move a number of funcs/files in the top-level `main` package into a new
`util` package, so test logic can directly invoke functions like
RunMark(), etc. The main.go has been trimmed down to minimal sizing,
with former supporting funcs moved into `util` package, so they
can be run by unit tests.
Signed-off-by: Rich Scott <richscott@sent.com>