aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorebiggers <ebiggers@google.com>2019-09-08 19:46:59 -0700
committerJoseph Richey <joerichey@google.com>2019-09-08 19:46:59 -0700
commit6445dad7d66fa6a1867090fcd9602c98863649f6 (patch)
treec0e5209f018a50ee8b0a1277cc7b06266eff18c1 /util
parent28b29d1c97ffd97671186b5e1fae37b64424f9ee (diff)
Fix various typos and grammatical errors (#141)
These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore().
Diffstat (limited to 'util')
-rw-r--r--util/errors.go4
-rw-r--r--util/util.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/util/errors.go b/util/errors.go
index f10569e..3c87a2c 100644
--- a/util/errors.go
+++ b/util/errors.go
@@ -72,7 +72,7 @@ type ErrWriter struct {
err error
}
-// NewErrWriter creates an ErrWriter which wraps the provided reader.
+// NewErrWriter creates an ErrWriter which wraps the provided writer.
func NewErrWriter(writer io.Writer) *ErrWriter {
return &ErrWriter{w: writer, err: nil}
}
@@ -116,7 +116,7 @@ func NeverError(err error) {
}
var (
- // testEnvVarName is the name on an environment variable that should be
+ // testEnvVarName is the name of an environment variable that should be
// set to an empty mountpoint. This is only used for integration tests.
// If not set, integration tests are skipped.
testEnvVarName = "TEST_FILESYSTEM_ROOT"
diff --git a/util/util.go b/util/util.go
index 50663d5..97ee33c 100644
--- a/util/util.go
+++ b/util/util.go
@@ -31,7 +31,7 @@ import (
"unsafe"
)
-// Ptr converts an Go byte array to a pointer to the start of the array.
+// Ptr converts a Go byte array to a pointer to the start of the array.
func Ptr(slice []byte) unsafe.Pointer {
if len(slice) == 0 {
return nil
@@ -42,14 +42,14 @@ func Ptr(slice []byte) unsafe.Pointer {
// ByteSlice takes a pointer to some data and views it as a slice of bytes.
// Note, indexing into this slice is unsafe.
func ByteSlice(ptr unsafe.Pointer) []byte {
- // Silce must fit in the smallest address space go suppports.
+ // Slice must fit in the smallest address space go supports.
return (*[1 << 30]byte)(ptr)[:]
}
// PointerSlice takes a pointer to an array of pointers and views it as a slice
// of pointers. Note, indexing into this slice is unsafe.
func PointerSlice(ptr unsafe.Pointer) []unsafe.Pointer {
- // Silce must fit in the smallest address space go suppports.
+ // Slice must fit in the smallest address space go supports.
return (*[1 << 28]unsafe.Pointer)(ptr)[:]
}