mirror of
https://github.com/taigrr/systemctl.git
synced 2026-03-09 00:14:38 -07:00
Update README to fix namespace error
This commit is contained in:
@@ -65,10 +65,10 @@ func main() {
|
|||||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
// Equivalent to `systemctl enable nginx` with a 10 second timeout
|
// Equivalent to `systemctl enable nginx` with a 10 second timeout
|
||||||
opts := Options{
|
opts := systemctl.Options{
|
||||||
usermode: false,
|
usermode: false,
|
||||||
}
|
}
|
||||||
err := Enable(ctx, unit, opts)
|
err := systemctl.Enable(ctx, unit, opts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("unable to enable unit %s: %v", "nginx", err)
|
log.Fatalf("unable to enable unit %s: %v", "nginx", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user