Tai Groot
d38136c0dc
refactor: clean up unused code, fix typos, improve docs ( #7 )
...
* refactor: clean up unused code, fix typos, improve docs
- Remove unused 'killed' const and 'unitTypes' var (staticcheck U1000)
- Replace regexp with strings.TrimSuffix+switch in isFailed for consistency
- Fix typo: 'programatically' -> 'programmatically'
- Fix typo: 'an an int' -> 'as an int' in README and helpers.go
- Add missing godoc comments on exported helper functions
- Bump minimum Go version from 1.18 to 1.21
* refactor: use unused constants instead of removing them
- Export unitTypes as UnitTypes and add HasValidUnitSuffix helper
- Use killed const (exit code 130) in execute() to detect SIGINT
- Update go.mod to go 1.26
2026-02-23 00:01:59 -05:00
Dat Boi Diego
14c9f0f70d
chore: add "support" for non-linux platforms ( #6 )
2025-09-20 19:34:22 -04:00
Tai Groot
21fce7918e
add linux build tags to restrict compilation to linux targets
2025-02-13 16:49:49 -08:00
Tai Groot
33828cf7b9
gofumpt against systemctl + add reenable
2022-10-23 23:26:52 -07:00
Tai Groot
a32749ff89
Feature complete. Tests may change now, but API is frozen.
2021-05-17 00:46:59 -07:00
Tai Groot
54b77122a5
Stubs out remainder of tests
2021-05-16 23:08:42 -07:00
Tai Groot
e941c90f0d
Migrates many tests to errors_test
2021-05-16 22:00:50 -07:00
Tai Groot
dd48d610dc
Adds helper function for getting NRestarts
2021-05-16 19:41:44 -07:00
Tai Groot
1ce6ec028a
Add documentation and enable example
2021-05-16 18:04:21 -07:00
Tai Groot
6b8241ed7c
Make IsEnabled match the documentation
2021-05-16 17:20:03 -07:00
Tai Groot
7325dda66d
Export UserMode options
2021-05-16 15:53:54 -07:00
Tai Groot
58970695b4
add masked check to isEnabled boolean
2021-05-15 20:04:46 -07:00
Tai Groot
64249bf8e6
Adds more tests for GetStartTime
2021-05-15 18:14:01 -07:00
Tai Groot
322e3458ac
add property definitions and show test
2021-05-15 14:24:31 -07:00
Tai Groot
8a7c865b5f
adds option structs, ready for Show implementation
2021-05-15 13:49:34 -07:00
Tai Groot
7bedb452e4
add success case to tests
2021-05-14 18:01:19 -07:00
Tai Groot
feff1f6edd
check stderr before reporting back error 1
2021-05-14 17:53:54 -07:00
Tai Groot
2517125d98
preliminary version of enable complete
2021-05-14 16:44:39 -07:00
Tai Groot
f9f44604e1
rearrange ctx parameter to match stdlib
2021-05-14 16:20:58 -07:00
Tai Groot
8bb696fb51
use CommandContext
2021-05-14 16:13:07 -07:00
Tai Groot
7762c3af12
stubbs out errors, adds mask and unmask to scope
2021-05-14 14:46:38 -07:00
Tai Groot
e3bcf1f239
Initial commit
2021-05-14 14:27:29 -07:00