rearrange ctx parameter to match stdlib

This commit is contained in:
2021-05-14 16:20:58 -07:00
parent 8bb696fb51
commit f9f44604e1
2 changed files with 24 additions and 14 deletions

View File

@@ -48,13 +48,21 @@ func main() {
defer cancel()
// Equivalent to `systemctl enable dhcpd` with a 10 second timeout
err := systemctl.Enable("dhcpd", ctx)
err := systemctl.Enable(ctx, "dhcpd")
if err != nil {
log.Fatalf("unable to enable unit %s: %v", "dhcpd", err)
}
}
```
## License
This project is licensed under the 0BSD License, written by [Rob Landley](https://github.com/landley).
As such, you may use this library without restriction or attribution, but please don't pass it off as your own.
Attribution, though not required, is appreciated.
By contributing, you agree all code submitted also falls under the License.
## External resources
- [Official systemctl documentation](https://www.man7.org/linux/man-pages/man1/systemctl.1.html)