treewide: documentation on exported functions should start with their name

Change-Id: Iea3e929bed743d7edfbf5b54bbaa31796aeaaadd
Reviewed-on: https://review.monogon.dev/c/monogon/+/3027
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/metropolis/pkg/bootparam/bootparam.go b/metropolis/pkg/bootparam/bootparam.go
index 3d6b7fa..240abf3 100644
--- a/metropolis/pkg/bootparam/bootparam.go
+++ b/metropolis/pkg/bootparam/bootparam.go
@@ -33,7 +33,7 @@
 	}
 }
 
-// Trim spaces as defined by Linux from the left of the string.
+// TrimLeftSpace spaces as defined by Linux from the left of the string.
 // This is only exported for tests, do not use this. Because of import loops
 // as well as cgo restrictions this cannot be an internal function used by
 // tests.
diff --git a/metropolis/pkg/fileargs/fileargs.go b/metropolis/pkg/fileargs/fileargs.go
index 88863da..7b14550 100644
--- a/metropolis/pkg/fileargs/fileargs.go
+++ b/metropolis/pkg/fileargs/fileargs.go
@@ -46,7 +46,7 @@
 	return NewWithSize(DefaultSize)
 }
 
-// NewWthSize is the same as new, but with a custom size limit. Please be aware
+// NewWithSize is the same as new, but with a custom size limit. Please be aware
 // that this data cannot be swapped out and using a size limit that's too high
 // can deadlock your kernel.
 func NewWithSize(size uint64) (*FileArgs, error) {
diff --git a/metropolis/pkg/kmod/modinfo.go b/metropolis/pkg/kmod/modinfo.go
index f75e761..5c01681 100644
--- a/metropolis/pkg/kmod/modinfo.go
+++ b/metropolis/pkg/kmod/modinfo.go
@@ -105,10 +105,10 @@
 	return i["firmware"]
 }
 
-// License returns the licenses use of this module is governed by. For mainline
-// modules, the list of valid license strings is documented in the kernel's
-// Documentation/process/license-rules.rst file under the `MODULE_LICENSE`
-// section.
+// Licenses returns the licenses use of this module is governed by.
+// For mainline modules, the list of valid license strings is
+// documented in the kernel's Documentation/process/license-rules.rst file
+// under the `MODULE_LICENSE` section.
 func (i ModuleInfo) Licenses() []string {
 	return i["license"]
 }
diff --git a/metropolis/pkg/logtree/leveled_payload.go b/metropolis/pkg/logtree/leveled_payload.go
index c0852ae..e2b2ff1 100644
--- a/metropolis/pkg/logtree/leveled_payload.go
+++ b/metropolis/pkg/logtree/leveled_payload.go
@@ -97,8 +97,8 @@
 	return
 }
 
-// Message returns the inner message lines of this entry, ie. what was passed to
-// the actual logging method, but split by newlines.
+// Messages returns the inner message lines of this entry, ie. what was passed
+// to the actual logging method, but split by newlines.
 func (p *LeveledPayload) Messages() []string { return p.messages }
 
 func (p *LeveledPayload) MessagesJoined() string { return strings.Join(p.messages, "\n") }
diff --git a/metropolis/pkg/logtree/logtree_entry.go b/metropolis/pkg/logtree/logtree_entry.go
index 72cc409..6bd8752 100644
--- a/metropolis/pkg/logtree/logtree_entry.go
+++ b/metropolis/pkg/logtree/logtree_entry.go
@@ -205,8 +205,8 @@
 	return "INVALID ", []string{"INVALID"}
 }
 
-// Convert this LogEntry to proto. Returned value may be nil if given LogEntry is
-// invalid, eg. contains neither a Raw nor Leveled entry.
+// Proto converts this LogEntry to proto. Returned value may be nil if given
+// LogEntry is invalid, eg. contains neither a Raw nor Leveled entry.
 func (l *LogEntry) Proto() *cpb.LogEntry {
 	p := &cpb.LogEntry{
 		Dn: string(l.DN),
@@ -228,8 +228,9 @@
 	return p
 }
 
-// Parse a proto LogEntry back into internal structure. This can be used in log
-// proto API consumers to easily print received log entries.
+// LogEntryFromProto parses a proto LogEntry back into internal structure.
+// This can be used in log proto API consumers to easily print received log
+// entries.
 func LogEntryFromProto(l *cpb.LogEntry) (*LogEntry, error) {
 	dn := DN(l.Dn)
 	if _, err := dn.Path(); err != nil {