all: fix golint violations

Change-Id: I35d9f6842ec2e9b36c14672a05c4381441bda87a
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/224582
Reviewed-by: Herbie Ong <herbie@google.com>
diff --git a/internal/encoding/json/encode.go b/internal/encoding/json/encode.go
index 17dec31..fbdf348 100644
--- a/internal/encoding/json/encode.go
+++ b/internal/encoding/json/encode.go
@@ -85,7 +85,7 @@
 }
 
 // Sentinel error used for indicating invalid UTF-8.
-var invalidUTF8Err = errors.New("invalid UTF-8")
+var errInvalidUTF8 = errors.New("invalid UTF-8")
 
 func appendString(out []byte, in string) ([]byte, error) {
 	out = append(out, '"')
@@ -94,7 +94,7 @@
 	for len(in) > 0 {
 		switch r, n := utf8.DecodeRuneInString(in); {
 		case r == utf8.RuneError && n == 1:
-			return out, invalidUTF8Err
+			return out, errInvalidUTF8
 		case r < ' ' || r == '"' || r == '\\':
 			out = append(out, '\\')
 			switch r {
diff --git a/internal/flags/flags.go b/internal/flags/flags.go
index ab62da2..58372dd 100644
--- a/internal/flags/flags.go
+++ b/internal/flags/flags.go
@@ -16,7 +16,7 @@
 // As such, functionality may suddenly be removed or changed at our discretion.
 const ProtoLegacy = protoLegacy
 
-// LazyUnmarshalExtension specifies whether to lazily unmarshal extensions.
+// LazyUnmarshalExtensions specifies whether to lazily unmarshal extensions.
 //
 // Lazy extension unmarshaling validates the contents of message-valued
 // extension fields at unmarshal time, but defers creating the message
diff --git a/testing/protopack/pack.go b/testing/protopack/pack.go
index 060529e..5d28450 100644
--- a/testing/protopack/pack.go
+++ b/testing/protopack/pack.go
@@ -170,7 +170,7 @@
 	return n
 }
 
-// Message encodes a syntax tree into the protobuf wire format.
+// Marshal encodes a syntax tree into the protobuf wire format.
 //
 // Example message definition:
 //	message MyMessage {