Related to #11534 this is an extract from the code I used to build a prototype to see if `swiftDialog` would work for us. This is very similar to the work we did for Nudge previously.
pmset
errcheck
golangci-lint