mirror of
https://github.com/taigrr/systemctl.git
synced 2026-03-09 00:14:38 -07:00
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
This commit is contained in:
@@ -104,7 +104,7 @@ func Start(ctx context.Context, unit string, opts Options) error {
|
||||
// Get back the status string which would be returned by running
|
||||
// `systemctl status [unit]`.
|
||||
//
|
||||
// Generally, it makes more sense to programatically retrieve the properties
|
||||
// Generally, it makes more sense to programmatically retrieve the properties
|
||||
// using Show, but this command is provided for the sake of completeness
|
||||
func Status(ctx context.Context, unit string, opts Options) (string, error) {
|
||||
stat, err := status(ctx, unit, opts)
|
||||
|
||||
Reference in New Issue
Block a user