treewide: cleanup error string formatting

Change-Id: I9012ba58dded916984468219b214200144a439b9
Reviewed-on: https://review.monogon.dev/c/monogon/+/3023
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Vouch-Run-CI: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/cli/metroctl/core/install.go b/metropolis/cli/metroctl/core/install.go
index 31b7328..223e773 100644
--- a/metropolis/cli/metroctl/core/install.go
+++ b/metropolis/cli/metroctl/core/install.go
@@ -34,7 +34,7 @@
 // with a bundle and/or Node Parameters.
 func MakeInstallerImage(args MakeInstallerImageArgs) error {
 	if args.Installer == nil {
-		return errors.New("Installer is mandatory")
+		return errors.New("installer is mandatory")
 	}
 
 	espRoot := fat32.Inode{Attrs: fat32.AttrDirectory}
diff --git a/metropolis/node/build/mkverity/mkverity.go b/metropolis/node/build/mkverity/mkverity.go
index 7300f49..f44b601 100644
--- a/metropolis/node/build/mkverity/mkverity.go
+++ b/metropolis/node/build/mkverity/mkverity.go
@@ -58,7 +58,7 @@
 		return nil, fmt.Errorf("the data image must be a regular file")
 	}
 	if ds.Size()%int64(bs) != 0 {
-		return nil, fmt.Errorf("the data image must end on a %d-byte block boundary.", bs)
+		return nil, fmt.Errorf("the data image must end on a %d-byte block boundary", bs)
 	}
 
 	// Create an empty hash image file.
diff --git a/metropolis/node/core/cluster/cluster_join.go b/metropolis/node/core/cluster/cluster_join.go
index 53ca815..cdbf0b3 100644
--- a/metropolis/node/core/cluster/cluster_join.go
+++ b/metropolis/node/core/cluster/cluster_join.go
@@ -28,7 +28,7 @@
 	// Get Cluster CA from Sealed Configuration.
 	ca, err := x509.ParseCertificate(sc.ClusterCa)
 	if err != nil {
-		return fmt.Errorf("Cluster CA certificate present in Sealed Configuration could not be parsed: %w", err)
+		return fmt.Errorf("cluster CA certificate present in Sealed Configuration could not be parsed: %w", err)
 	}
 
 	// Tell the user what we're doing.
diff --git a/metropolis/node/core/metrics/metrics.go b/metropolis/node/core/metrics/metrics.go
index ffae970..bd229fa 100644
--- a/metropolis/node/core/metrics/metrics.go
+++ b/metropolis/node/core/metrics/metrics.go
@@ -140,5 +140,5 @@
 	if err != nil && ctx.Err() != nil {
 		return ctx.Err()
 	}
-	return fmt.Errorf("Serve: %w", err)
+	return fmt.Errorf("Serve(): %w", err)
 }
diff --git a/metropolis/node/core/network/static.go b/metropolis/node/core/network/static.go
index 6c72be5..abe9aca 100644
--- a/metropolis/node/core/network/static.go
+++ b/metropolis/node/core/network/static.go
@@ -44,7 +44,7 @@
 		return err
 	}
 	if loopbackLink == nil {
-		return errors.New("No loopback interface present, weird/broken kernel?")
+		return errors.New("no loopback interface present, weird/broken kernel?")
 	}
 	if err := netlink.LinkSetUp(loopbackLink); err != nil {
 		l.Error("Failed to enable loopback interface: %w", err)
diff --git a/metropolis/node/core/roleserve/worker_heartbeat.go b/metropolis/node/core/roleserve/worker_heartbeat.go
index c11c5d0..6ba07c5 100644
--- a/metropolis/node/core/roleserve/worker_heartbeat.go
+++ b/metropolis/node/core/roleserve/worker_heartbeat.go
@@ -49,7 +49,7 @@
 
 		_, err := stream.Recv()
 		if err == io.EOF {
-			return fmt.Errorf("stream closed by the server. Restarting worker...")
+			return fmt.Errorf("stream closed by the server, restarting worker... ")
 		}
 		if err != nil {
 			return fmt.Errorf("while receiving a heartbeat reply: %v", err)
diff --git a/metropolis/pkg/fat32/fat32.go b/metropolis/pkg/fat32/fat32.go
index 5d26694..7a45aa4 100644
--- a/metropolis/pkg/fat32/fat32.go
+++ b/metropolis/pkg/fat32/fat32.go
@@ -431,7 +431,7 @@
 
 	allocClusters := len(p.fat)
 	if allocClusters >= fatMask&math.MaxUint32 {
-		return fmt.Errorf("filesystem contains more than 2^28 FAT entries, this is unsupported. Note that this package currently always creates minimal clusters.")
+		return fmt.Errorf("filesystem contains more than 2^28 FAT entries, this is unsupported. Note that this package currently always creates minimal clusters")
 	}
 
 	// Fill out FAT to minimum size for FAT32
diff --git a/metropolis/pkg/verity/encoder.go b/metropolis/pkg/verity/encoder.go
index 871cec0..b28e01d 100644
--- a/metropolis/pkg/verity/encoder.go
+++ b/metropolis/pkg/verity/encoder.go
@@ -532,9 +532,9 @@
 func (e *encoder) MappingTable(dataDevicePath, hashDevicePath string, hashStart int64) (*MappingTable, error) {
 	if e.rootHash == nil {
 		if e.bottom.Len() != 0 {
-			return nil, fmt.Errorf("encoder wasn't closed.")
+			return nil, fmt.Errorf("encoder wasn't closed")
 		}
-		return nil, fmt.Errorf("encoder is empty.")
+		return nil, fmt.Errorf("encoder is empty")
 	}
 
 	if e.writeSb {
diff --git a/metropolis/test/launch/cluster/cluster.go b/metropolis/test/launch/cluster/cluster.go
index ca9becd..32c351f 100644
--- a/metropolis/test/launch/cluster/cluster.go
+++ b/metropolis/test/launch/cluster/cluster.go
@@ -495,7 +495,7 @@
 		}
 		return n, nil
 	}
-	return nil, fmt.Errorf("no such node.")
+	return nil, fmt.Errorf("no such node")
 }
 
 // Gets a random EUI-48 Ethernet MAC address