mirror of
https://github.com/taigrr/systemctl.git
synced 2026-03-09 00:14:38 -07:00
Allow callers to pass additional systemctl flags (e.g. --no-block, --force) via variadic string args on every exported function. This is backward-compatible: existing callers without extra args continue to work unchanged. Introduces a prepareArgs helper to centralize argument construction, replacing the duplicated args/UserMode pattern across all functions. Closes #2
66 lines
1.4 KiB
Go
66 lines
1.4 KiB
Go
//go:build !linux
|
|
|
|
package systemctl
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/taigrr/systemctl/properties"
|
|
)
|
|
|
|
func daemonReload(_ context.Context, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func reenable(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func disable(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func enable(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func isActive(_ context.Context, _ string, _ Options, _ ...string) (bool, error) {
|
|
return false, nil
|
|
}
|
|
|
|
func isEnabled(_ context.Context, _ string, _ Options, _ ...string) (bool, error) {
|
|
return false, nil
|
|
}
|
|
|
|
func isFailed(_ context.Context, _ string, _ Options, _ ...string) (bool, error) {
|
|
return false, nil
|
|
}
|
|
|
|
func mask(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func restart(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func show(_ context.Context, _ string, _ properties.Property, _ Options, _ ...string) (string, error) {
|
|
return "", nil
|
|
}
|
|
|
|
func start(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func status(_ context.Context, _ string, _ Options, _ ...string) (string, error) {
|
|
return "", nil
|
|
}
|
|
|
|
func stop(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|
|
|
|
func unmask(_ context.Context, _ string, _ Options, _ ...string) error {
|
|
return nil
|
|
}
|