*: reflow comments to 80 characters
This reformats the entire Metropolis codebase to have comments no longer
than 80 characters, implementing CR/66.
This has been done half manually, as we don't have a good integration
between commentwrap/Bazel, but that can be implemented if we decide to
go for this tool/limit.
Change-Id: If1fff0b093ef806f5dc00551c11506e8290379d0
diff --git a/metropolis/node/build/genosrelease/main.go b/metropolis/node/build/genosrelease/main.go
index e19876e..ad6e3e2 100644
--- a/metropolis/node/build/genosrelease/main.go
+++ b/metropolis/node/build/genosrelease/main.go
@@ -14,8 +14,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// genosrelease provides rudimentary support to generate os-release files following the freedesktop spec
-// (https://www.freedesktop.org/software/systemd/man/os-release.html) from arguments and stamping
+// genosrelease provides rudimentary support to generate os-release files
+// following the freedesktop spec from arguments and stamping
+//
+// https://www.freedesktop.org/software/systemd/man/os-release.html
package main
import (
diff --git a/metropolis/node/build/mkerofs/main.go b/metropolis/node/build/mkerofs/main.go
index a05e440..ea89d67 100644
--- a/metropolis/node/build/mkerofs/main.go
+++ b/metropolis/node/build/mkerofs/main.go
@@ -14,8 +14,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// mkerofs takes a specification in the form of a prototext file (see fsspec next to this) and assembles an
-// EROFS filesystem according to it. The output is fully reproducible.
+// mkerofs takes a specification in the form of a prototext file (see fsspec
+// next to this) and assembles an EROFS filesystem according to it. The output
+// is fully reproducible.
package main
import (
@@ -99,9 +100,11 @@
children map[string]*entrySpec
}
-// pathRef gets the entrySpec at the leaf of the given path, inferring directories if necessary
+// pathRef gets the entrySpec at the leaf of the given path, inferring
+// directories if necessary
func (s *entrySpec) pathRef(p string) *entrySpec {
- // This block gets a path array starting at the root of the filesystem. The root folder is the zero-length array.
+ // This block gets a path array starting at the root of the filesystem. The
+ // root folder is the zero-length array.
pathParts := strings.Split(path.Clean("./"+p), "/")
if pathParts[0] == "." {
pathParts = pathParts[1:]
diff --git a/metropolis/node/build/mkimage/main.go b/metropolis/node/build/mkimage/main.go
index 5546055..f41d643 100644
--- a/metropolis/node/build/mkimage/main.go
+++ b/metropolis/node/build/mkimage/main.go
@@ -84,7 +84,8 @@
}
table := &gpt.Table{
- // This is appropriate at least for virtio disks. Might need to be adjusted for real ones.
+ // This is appropriate at least for virtio disks. Might need to be
+ // adjusted for real ones.
LogicalSectorSize: 512,
PhysicalSectorSize: 512,
ProtectiveMBR: true,
@@ -165,7 +166,8 @@
log.Fatalf("os.Open(%q): %v", src, err)
}
defer source.Close()
- // If this is streamed (e.g. using io.Copy) it exposes a bug in diskfs, so do it in one go.
+ // If this is streamed (e.g. using io.Copy) it exposes a bug in diskfs, so
+ // do it in one go.
data, err := ioutil.ReadAll(source)
if err != nil {
log.Fatalf("Reading %q: %v", src, err)