From 963644c19058829f74bd7d19a484c0786d6777cd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 27 Dec 2016 21:59:17 -0700 Subject: Documentation improvements. Also, I renamed a couple of the sd_id128 functions for better clarity. But since I haven't pushed since originally implementing them, I'm not labeling it as a breaking change. --- sd_daemon/booted.go | 4 ++++ sd_daemon/doc.go | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'sd_daemon') diff --git a/sd_daemon/booted.go b/sd_daemon/booted.go index b833b45..18fd4fb 100644 --- a/sd_daemon/booted.go +++ b/sd_daemon/booted.go @@ -23,6 +23,10 @@ import "os" // Please do not use this function. All of the other functionality in // this package uses interfaces that are not systemd-specific. func SdBooted() bool { + // BUG(lukeshu): SdBooted is systemd-specific, and isn't of + // particular value to daemons. It doesn't really belong in a + // library of generic daemon utilities. But, we defer to its + // inclusion in the C-language libsystemd. fi, err := os.Lstat("/run/systemd/system") return err != nil && fi.IsDir() } diff --git a/sd_daemon/doc.go b/sd_daemon/doc.go index 90616f6..927ac7f 100644 --- a/sd_daemon/doc.go +++ b/sd_daemon/doc.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package sd_daemon provides functions for writing "new-style" +// Package sd_daemon implements utilities for writing "new-style" // daemons. // // The daemon(7) manual page has historically documented the very long @@ -24,7 +24,11 @@ // systemd, they are all very simple mechanisms which can easily be // implemented with a variety of service managers. // -// [daemon(7)]: https://www.freedesktop.org/software/systemd/man/daemon.html +// daemon(7): https://www.freedesktop.org/software/systemd/man/daemon.html +// +// BUG(lukeshu): Logically, sd_id128.GetInvocationID might belong in +// this package, but we defer to the C-language libsystemd's placement +// of sd_id128_get_invocation() in sd-id128.h. package sd_daemon import "errors" -- cgit v1.2.3