treewide: documentation on exported types should start with their name
Change-Id: I2e25157459ecc55421138e9fb6a15de5024d00fd
Reviewed-on: https://review.monogon.dev/c/monogon/+/3028
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/node/core/consensus/status.go b/metropolis/node/core/consensus/status.go
index 17df8f9..44562bf 100644
--- a/metropolis/node/core/consensus/status.go
+++ b/metropolis/node/core/consensus/status.go
@@ -183,7 +183,7 @@
}, nil
}
-// AddNodeOptions can be passed to AddNode to influence the behaviour of the
+// AddNodeOption can be passed to AddNode to influence the behaviour of the
// function. Currently this is only used internally by tests.
type AddNodeOption struct {
externalAddress string
diff --git a/metropolis/node/core/network/dns/directives.go b/metropolis/node/core/network/dns/directives.go
index a9570e8..57b06e1 100644
--- a/metropolis/node/core/network/dns/directives.go
+++ b/metropolis/node/core/network/dns/directives.go
@@ -22,7 +22,7 @@
"strings"
)
-// Type ExtraDirective contains additional config directives for CoreDNS.
+// ExtraDirective contains additional config directives for CoreDNS.
type ExtraDirective struct {
// ID is the identifier of this directive. There can only be one directive
// with a given ID active at once. The ID is also used to identify which
diff --git a/metropolis/node/core/rpc/resolver/resolver.go b/metropolis/node/core/rpc/resolver/resolver.go
index 4e79bae..88d95d7 100644
--- a/metropolis/node/core/rpc/resolver/resolver.go
+++ b/metropolis/node/core/rpc/resolver/resolver.go
@@ -106,7 +106,7 @@
return r
}
-// ResolverOptions are passed to a Resolver being created.
+// ResolverOption are passed to a Resolver being created.
type ResolverOption func(r *Resolver)
// WithLogger configures a given function as the logger of the resolver. The
diff --git a/metropolis/node/core/rpc/trace.go b/metropolis/node/core/rpc/trace.go
index 934bcc9..0d43806 100644
--- a/metropolis/node/core/rpc/trace.go
+++ b/metropolis/node/core/rpc/trace.go
@@ -16,7 +16,7 @@
// Span implements a compatible subset of
// go.opentelemetry.io/otel/trace.Span.
-// It is used in place of trace.Span until opentelemetry support
+// Span is used in place of trace.Span until opentelemetry support
// is fully implemented and thus the library is pulled in. Once
// that happens, all relevant methods will be replace with an
// embedding of the trace.Span interface.
diff --git a/metropolis/pkg/jsonpatch/jsonpatch.go b/metropolis/pkg/jsonpatch/jsonpatch.go
index be3d302..fe0fbac 100644
--- a/metropolis/pkg/jsonpatch/jsonpatch.go
+++ b/metropolis/pkg/jsonpatch/jsonpatch.go
@@ -20,7 +20,7 @@
import "strings"
-// JSON Patch operation (RFC 6902 Section 4)
+// JsonPatchOp describes a JSON Patch operation (RFC 6902 Section 4)
type JsonPatchOp struct {
Operation string `json:"op"`
Path string `json:"path"` // Technically a JSON Pointer, but called Path in the RFC
diff --git a/metropolis/pkg/pstore/pstore.go b/metropolis/pkg/pstore/pstore.go
index 3958498..610f565 100644
--- a/metropolis/pkg/pstore/pstore.go
+++ b/metropolis/pkg/pstore/pstore.go
@@ -52,7 +52,7 @@
}, nil
}
-// A reassembled kernel message buffer dump from pstore.
+// KmsgDump reassembled a kernel message buffer dump from pstore.
type KmsgDump struct {
// The reason why the dump was created. Common values include "Panic" and
// "Oops", but depending on the setting `printk.always_kmsg_dump` and
diff --git a/metropolis/pkg/scsi/inquiry.go b/metropolis/pkg/scsi/inquiry.go
index bce2c9a..819b011 100644
--- a/metropolis/pkg/scsi/inquiry.go
+++ b/metropolis/pkg/scsi/inquiry.go
@@ -199,7 +199,7 @@
VersionDescriptors []uint16
}
-// Table 498
+// VPDPageCode see Table 498
type VPDPageCode uint8
const (
diff --git a/metropolis/pkg/tpm/tpm.go b/metropolis/pkg/tpm/tpm.go
index 2dbe6f6..13a3e59 100644
--- a/metropolis/pkg/tpm/tpm.go
+++ b/metropolis/pkg/tpm/tpm.go
@@ -623,7 +623,7 @@
return pcrs, nil
}
-// GetMeasurmentLog returns the binary log of all data hashed into PCRs. The
+// GetMeasurementLog returns the binary log of all data hashed into PCRs. The
// result can be parsed by eventlog. As this library currently doesn't support
// extending PCRs it just returns the log as supplied by the EFI interface.
func GetMeasurementLog() ([]byte, error) {