From 299aa6727025c4f888ec2a38b8945ed39159a99c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 14 Apr 2026 11:37:13 +0300 Subject: docs: add godoc for exports (ask 04) Document Record, Open, CreateSchema, ResetRecords, ImportFromDir, LoadRecords in storage; Reporter and reporters in goprecords; Fields and Parse in recordline; Config and Run in daemon. Made-with: Cursor --- internal/recordline/recordline.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/recordline') diff --git a/internal/recordline/recordline.go b/internal/recordline/recordline.go index 077fa35..5ff06ab 100644 --- a/internal/recordline/recordline.go +++ b/internal/recordline/recordline.go @@ -5,6 +5,7 @@ import ( "strings" ) +// Fields holds the values parsed from a single uptimed record line. type Fields struct { Uptime uint64 BootTime uint64 @@ -13,6 +14,8 @@ type Fields struct { KernelMajor string } +// Parse parses one non-empty line of the form "uptime:boottime:os..." from an +// uptimed .records file. It returns false if the line is empty or malformed. func Parse(line string) (Fields, bool) { line = strings.TrimSpace(line) if line == "" { -- cgit v1.2.3