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

20 Commits

Author SHA1 Message Date
David Bouchare
cf3229e0cd
Add a few more tests (#1056)
* Add test for SumInts()

* Add a few more tests in utils

* Minor update for SumInts test
2021-03-01 08:33:42 -08:00
Chris Cummer
ac2817613b Fix a spelling mistake in a comment:
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-21 07:59:02 -08:00
Chris Cummer
10f761dbcb
20191217 gosec (#796)
* Add gosec to the Makefile

Signed-off-by: Chris Cummer <chriscummer@me.com>

* Fix some issues found by gosec

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-12-17 14:59:16 -08: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
251e3fe10d
Add warning for empty grid values (#741)
Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 15:13:30 -08:00
Chris Cummer
b2093314f0 Fix grid: key issue when key is present
Really do need it to work with and without a grid: key.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 14:13:47 -08:00
Chris Cummer
a18fce88ac
WTF-718 Fixes missing grid issue when running CmdRunner (#740)
Closes #718 and closes #730.

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-11-09 14:09:13 -08:00
Chris Cummer
1bfca29d17
WTF-657 Add spec coverage for cfg/common_settings.go (#728)
* WTF-657 Add spec coverage for cfg/common_settings.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for cfg/position_validation.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for cfg/validations.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for checklist/checklist.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for checklist/checklist_item.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for utils/conversions.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Get rid of utils.Home() function

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for utils/homedir.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Add spec coverage for utils/text.go

Signed-off-by: Chris Cummer <chriscummer@me.com>

* WTF-657 Clean up utils/utils.go

Signed-off-by: Chris Cummer <chriscummer@me.com>
2019-10-30 17:35:00 -07:00
Chris Cummer
e43430e7ad Merge branch 'openutilupdate' of github.com:Seanstoppable/wtf into Seanstoppable-openutilupdate 2019-10-15 15:27:56 -04:00
Sean Smith
68e56eaa10 Add new urlutil option, and have these be reloadable
Handles #897 and part of #593
2019-10-12 17:44:28 -04:00
Tim Scheuermann
cdf37f053c Optimized ParseJson and ExecuteCommand 2019-10-11 23:17:01 +02:00
Tim Scheuermann
4ef6eb76c6 Added utils.CalculateDimensions 2019-10-09 14:54:47 +02:00
Chris Cummer
7c2d6b4c42 WTF-665 Add time format setting for gCal module
Allows the user to specify either "12" or "24" to set whether or not to
display times in AM/PM format or 24-hour format.

Example:

      gcal:
        enabled: true
        timeFormat: "12"
        refreshInterval: 360

Fixes #665
2019-10-01 21:37:03 -07:00
Sean Smith
36fbad54d8 Fix JSON parsing
Issue #600 points out Jenkins module panics occasionally
I noticed that a number of places panic because of JSON parsing
Centralize JSON parsing, have it return an error, and have widgets
report the error
2019-09-07 15:14:33 -04:00
Christopher Hall
e8bb4070d9 use xdg-open as default open method for http/https
This should be available on all BSD and similar OSs

Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
2019-08-28 11:33:28 +08:00
Chris Cummer
c832db9ddb Add utils.Includes() helper function 2019-08-20 16:39:15 -07:00
Chris Cummer
3e2d6eb5fa Fix the naming and specs for some utility functions 2019-08-05 11:40:42 -07:00
Chris Cummer
ecd95ba2d2 Move a bunch of code out of utils.go and into dedicated files 2019-08-05 11:16:26 -07:00
Chris Cummer
4e46fff145 Move the utils.go file into the /utils directory 2019-08-05 10:50:12 -07:00