chore: add "support" for non-linux platforms (#6)

This commit is contained in:
Dat Boi Diego
2025-09-21 01:34:22 +02:00
committed by GitHub
parent 5f1537f8bc
commit 14c9f0f70d
7 changed files with 332 additions and 147 deletions

65
systemctl_darwin.go Normal file
View File

@@ -0,0 +1,65 @@
//go:build !linux
package systemctl
import (
"context"
"github.com/taigrr/systemctl/properties"
)
func daemonReload(ctx context.Context, opts Options) error {
return nil
}
func reenable(ctx context.Context, unit string, opts Options) error {
return nil
}
func disable(ctx context.Context, unit string, opts Options) error {
return nil
}
func enable(ctx context.Context, unit string, opts Options) error {
return nil
}
func isActive(ctx context.Context, unit string, opts Options) (bool, error) {
return false, nil
}
func isEnabled(ctx context.Context, unit string, opts Options) (bool, error) {
return false, nil
}
func isFailed(ctx context.Context, unit string, opts Options) (bool, error) {
return false, nil
}
func mask(ctx context.Context, unit string, opts Options) error {
return nil
}
func restart(ctx context.Context, unit string, opts Options) error {
return nil
}
func show(ctx context.Context, unit string, property properties.Property, opts Options) (string, error) {
return "", nil
}
func start(ctx context.Context, unit string, opts Options) error {
return nil
}
func status(ctx context.Context, unit string, opts Options) (string, error) {
return "", nil
}
func stop(ctx context.Context, unit string, opts Options) error {
return nil
}
func unmask(ctx context.Context, unit string, opts Options) error {
return nil
}