From 271cfdb3d33f39cd7049242638f3bc2b1cf796af Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 13 Apr 2024 17:38:55 -0700 Subject: [PATCH] util/syspolicy: clean up doc grammar and consistency Updates #cleanup Change-Id: I912574cbd5ef4d8b7417b8b2a9b9a2ccfef88840 Signed-off-by: Brad Fitzpatrick --- util/syspolicy/handler.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/util/syspolicy/handler.go b/util/syspolicy/handler.go index 7a98161c8..6403572b3 100644 --- a/util/syspolicy/handler.go +++ b/util/syspolicy/handler.go @@ -16,15 +16,19 @@ // Handler reads system policies from OS-specific storage. type Handler interface { - // ReadString reads the policy settings value string given the key. + // ReadString reads the policy setting's string value for the given key. + // It should return ErrNoSuchKey if the key does not have a value set. ReadString(key string) (string, error) - // ReadUInt64 reads the policy settings uint64 value given the key. + // ReadUInt64 reads the policy setting's uint64 value for the given key. + // It should return ErrNoSuchKey if the key does not have a value set. ReadUInt64(key string) (uint64, error) - // ReadBool reads the policy setting's boolean value, given the key. + // ReadBool reads the policy setting's boolean value for the given key. + // It should return ErrNoSuchKey if the key does not have a value set. ReadBoolean(key string) (bool, error) } -// ErrNoSuchKey is returned when the specified key does not have a value set. +// ErrNoSuchKey is returned by a Handler when the specified key does not have a +// value set. var ErrNoSuchKey = errors.New("no such key") // defaultHandler is the catch all syspolicy type for anything that isn't windows or apple.