Commit Graph

63 Commits

Author SHA1 Message Date
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
v1.1.0
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
5f1537f8bc Merge pull request #4 from MatthiasKunnen/build-lines
Fix build lines conflict with go toolchain version
2025-05-23 14:48:39 -07:00
Matthias Kunnen
d38d347cc6 Fix build lines conflict with go toolchain version
21fce7918e adds build tags, however,
these specific tags are not supported in the go version set in go.mod (1.12).
See <https://go.dev/doc/go1.17#build-lines> and <https://go.dev/doc/go1.18#go-build-lines>.
2025-05-23 17:29:00 +02:00
14a2ca2acd add placehomer unexported unittypes for later 2025-02-18 00:34:16 -08:00
451a949ace add new properties, socket finder v1.0.10 2025-02-18 00:30:12 -08:00
21fce7918e add linux build tags to restrict compilation to linux targets v1.0.9 2025-02-13 16:49:49 -08:00
54f4f7a235 add IsSystemd checker v1.0.8 2025-02-12 19:21:48 -08:00
fa15432121 add ability to list all units v1.0.7 2024-08-08 15:37:04 -07:00
7bd5bef0cb fix broken error filtration v1.0.6 2023-06-28 23:43:20 -07:00
a82f845b84 add IsRunning helper v1.0.5 2023-06-20 23:49:23 -04:00
c9e7f79f8c add IsMasked utility 2023-06-20 23:40:22 -04:00
0075dc6b4d update to fix some tests, remove panics, and wrap errors 2023-06-17 23:18:28 -04:00
5da4924315 gofumpt against remaining go files v1.0.4 2022-10-23 23:28:19 -07:00
33828cf7b9 gofumpt against systemctl + add reenable 2022-10-23 23:26:52 -07:00
e44344ee7d define unit in README 2022-03-20 23:44:30 -07:00
c8050d2258 fix whitespace 2022-03-20 23:43:30 -07:00
ae23e6ecb9 Fix lowercase typo 2022-03-20 23:42:35 -07:00
c9dec8a0b7 Update README to fix namespace error 2022-03-20 23:41:14 -07:00
f10c42cec1 update go compiler target version v1.0.3 2021-08-17 10:08:09 -07:00
f1979375cd add sponsorship 2021-07-05 21:08:33 -07:00
4e38d03629 move panic from init to exec v1.0.2 2021-06-06 04:55:07 -07:00
701893ebbd Properly return the zero time for invalid timestamps v1.0.1 2021-05-17 10:59:09 -07:00
a32749ff89 Feature complete. Tests may change now, but API is frozen. v1.0.0 2021-05-17 00:46:59 -07:00
15305985ee Adds Start tests 2021-05-16 23:59:09 -07:00
3f10bbd46e Adds tests for Restart 2021-05-16 23:54:07 -07:00
ab748adefc Finishes Mask tests 2021-05-16 23:44:21 -07:00
125e4771dd cleans up comments, adds short testing options to more tests 2021-05-16 23:19:59 -07:00
54b77122a5 Stubs out remainder of tests 2021-05-16 23:08:42 -07:00
c7b2246a46 Finishes IsEnabled test cases 2021-05-16 23:01:23 -07:00
60ac9b7400 finishes IsActive tests 2021-05-16 22:36:11 -07:00
27c2ad77c8 improves IsActive testing 2021-05-16 22:32:24 -07:00
e941c90f0d Migrates many tests to errors_test 2021-05-16 22:00:50 -07:00
dd48d610dc Adds helper function for getting NRestarts 2021-05-16 19:41:44 -07:00
1ce6ec028a Add documentation and enable example 2021-05-16 18:04:21 -07:00
6b8241ed7c Make IsEnabled match the documentation 2021-05-16 17:20:03 -07:00
3fcd88d966 Clean up errors and messages 2021-05-16 16:17:12 -07:00
7325dda66d Export UserMode options 2021-05-16 15:53:54 -07:00
399f21f9b9 spellcheck on README 2021-05-15 20:22:48 -07:00
6940870de8 Revert "Create go.yml"
This reverts commit 84dc669dda.
2021-05-15 20:22:40 -07:00
84dc669dda Create go.yml 2021-05-16 03:18:49 +00:00
c0d19bd507 spellcheck on README 2021-05-15 20:15:52 -07:00
45fda65ede updates to README 2021-05-15 20:13:36 -07:00
e7bbc166c3 Updates readme to reflect implementation 2021-05-15 20:06:27 -07:00
58970695b4 add masked check to isEnabled boolean 2021-05-15 20:04:46 -07:00
34f11bfcd1 Add masked unit tests for enable and disable 2021-05-15 20:02:05 -07:00
5865d30ada marked show tests as parallel 2021-05-15 19:19:23 -07:00
184bbc4936 Test disable function 2021-05-15 19:14:53 -07:00
b1346b7992 Finish tests for helper methods 2021-05-15 19:07:47 -07:00
64249bf8e6 Adds more tests for GetStartTime 2021-05-15 18:14:01 -07:00