1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

23 Commits

Author SHA1 Message Date
Sam Roberts
4bb725db9e golangci-lint configuration file
golangci-lint can run all the currently enabled linters, and as far as I
can tell, does it in under 5 seconds as opposed to over 180 seconds
(compare `time make cilint` and `time make lint`).

Some of the linters that are listed in the "enabled" section but
commented out looked like a good idea to me, and fairly low hanging
fruit to fix, but they are not passing at the moment.

All the linters covered in the current Makefile are run.

TODO:
- replace lint target in Makefile with golangci-lint
- remove .github/workflow/errcheck.yml
2020-05-16 12:34:57 -07:00
Sam Roberts
3c405da087 Use docker-credential-helper to manage secrets
Store service credentials securely in the stores supported by docker:
- https://github.com/docker/docker-credential-helpers#available-programs

Introduces a top-level config property, "secretStore" and additional
command line arguments to manage the stored secrets.

The value of secretStore is used to find a helper command,
`docker-credential-<secretStore>`.

The docker project currently provides 4 store helpers:
- "osxkeychain" (OS X only)
- "secretservice" (Linux only)
- "wincred" (Windows only)
- "pass" (any OS supporting pass, which uses gpg2)

Docker-for-desktop installs the credential helpers above, as well as
"desktop" (docker-credential-desktop).

Generic installation instructions for the helpers:
- https://github.com/docker/docker-credential-helpers#installation

Users could provide additional helpers, the only requirement is that the
helper implements the credential store protocol:
- https://github.com/docker/docker-credential-helpers#development

The credential protocol is open, and new credential stores can be
implemented by any CLI satisfying the protocol:
- https://github.com/docker/docker-credential-helpers#development

The modifications to existing modules is not tested due to lack
of API keys, but demonstrates the unobtrusive changes required to
use the secret store.
2020-05-10 19:26:32 -07:00
Chris Cummer
cde904ff08
Use errcheck to find unhandled errors (#795)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 08:26:16 -08:00
Chris Cummer
3a388fba23
20191215 code improvements (#790)
* Upgrade godo to latest
* Fix a bunch of issues found by
* Running staticcheck on a codebase for the first time is a sobering experience
* go mod tidy
* More static improvements

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-16 20:25:29 -08:00
Chris Cummer
f934f21638 Attempt to fix the HIBP index out of range bug 2019-09-27 20:06:58 -07:00
Chris Cummer
11a8f396b7 Minor cleanup in HIBP module 2019-09-26 18:10:44 -07:00
Chris Cummer
bf877f5fa7 Constantize the defaultFocus value for each module 2019-09-22 18:12:29 -07:00
Chris Cummer
fce8b69459 Support case-insensitive 'apiKey' config keys
'apiKey' is one that people are likely to spell wrong in their configs
as 'apikey'. Given that there's no sanity-checking around required
config values yet, and a missing API key can cause silent failures in
some modules, be liberal in accepting spelling.
2019-08-29 06:34:52 -07:00
Sean Smith
14e7619075 Renormalize the redraw function
Have all instances take a function
Update the remaining modules to take this into account
Numerous smaller refactors to make some widgets work more or less the same
2019-08-27 21:51:37 -04:00
Chris Cummer
0db7e7c533 Catch intermittent failure with HIBP module 2019-08-05 17:57:29 -07:00
Chris Cummer
4e46fff145 Move the utils.go file into the /utils directory 2019-08-05 10:50:12 -07:00
Chris Cummer
dbc047516d Move all components responsible for module composition into /view 2019-08-04 21:42:40 -07:00
Chris Cummer
edcb6d0ca4 WTF-508 HIBP now uses API v3 with authorization to fetch data 2019-07-21 14:45:10 -07:00
Chris Cummer
2e7f242056 HIBP module now wraps error text if an error occurrs 2019-07-09 13:00:41 -07:00
Chris Cummer
b07f3c5e67 Reimpliments the module configuration validation
Now supports displaying errors from multiple widgets.
2019-07-07 16:04:43 -07:00
Sean Smith
f4f2901e58 Add help strings from h-r 2019-07-05 12:16:55 -04:00
Chris Cummer
f19f1ee86d WTF-42 WIP Add FeedReader, an RSS/Atom feed reader 2019-07-03 21:54:10 -07:00
Chris Cummer
9244d60abe Add a rudimentary Transmission module (https://transmissionbt.com) 2019-06-26 06:58:27 -07:00
Chris Cummer
ae13a3394d WIP Transmission 2019-06-23 15:04:09 -07:00
Chris Cummer
70f9422a4e Deafult the HIBP ok colour to white 2019-06-22 16:13:32 -07:00
Chris Cummer
c75f00cb12 Enforce a minimum refresh interval for the HIBP module 2019-06-22 15:45:07 -07:00
Chris Cummer
8ce2242b52 Display the since date in the HIBP widget title 2019-06-22 15:31:37 -07:00
Chris Cummer
6216076b74 Add a working Have I Been Pwned module 2019-06-22 15:21:22 -07:00