summaryrefslogtreecommitdiff
path: root/src/pkg/reflect
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
commitd39f5aa373a4422f7a5f3ee764fb0f6b0b719d61 (patch)
tree1833f8b72a4b3a8f00d0d143b079a8fcad01c6ae /src/pkg/reflect
parent8652e6c371b8905498d3d314491d36c58d5f68d5 (diff)
downloadgolang-upstream/58.tar.gz
Imported Upstream version 58upstream/58
Diffstat (limited to 'src/pkg/reflect')
-rw-r--r--src/pkg/reflect/all_test.go12
-rw-r--r--src/pkg/reflect/value.go2
2 files changed, 3 insertions, 11 deletions
diff --git a/src/pkg/reflect/all_test.go b/src/pkg/reflect/all_test.go
index e20e03f50..c83a9b75f 100644
--- a/src/pkg/reflect/all_test.go
+++ b/src/pkg/reflect/all_test.go
@@ -182,9 +182,7 @@ var valueTests = []pair{
}),
"struct { c chan *int32; d float32 }{chan *int32, 0}",
},
- {new(struct {
- c func(chan *integer, *int8)
- }),
+ {new(struct{ c func(chan *integer, *int8) }),
"struct { c func(chan *reflect_test.integer, *int8) }{func(chan *reflect_test.integer, *int8)(0)}",
},
{new(struct {
@@ -581,13 +579,7 @@ func TestCopyArray(t *testing.T) {
}
for i := len(a); i < len(b); i++ {
if b[i] != c[i] {
- if i < len(a) {
- t.Errorf("(ii) a[%d]=%d, b[%d]=%d, c[%d]=%d",
- i, a[i], i, b[i], i, c[i])
- } else {
- t.Errorf("(iii) b[%d]=%d, c[%d]=%d",
- i, b[i], i, c[i])
- }
+ t.Errorf("(ii) b[%d]=%d, c[%d]=%d", i, b[i], i, c[i])
} else {
t.Logf("elem %d is okay\n", i)
}
diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go
index 2c2158a3c..3abe13e04 100644
--- a/src/pkg/reflect/value.go
+++ b/src/pkg/reflect/value.go
@@ -173,7 +173,7 @@ type nonEmptyInterface struct {
// Regarding the implementation of Value:
//
// The Internal interface is a true interface value in the Go sense,
-// but it also serves as a (type, address) pair in whcih one cannot
+// but it also serves as a (type, address) pair in which one cannot
// be changed separately from the other. That is, it serves as a way
// to prevent unsafe mutations of the Internal state even though
// we cannot (yet?) hide the field while preserving the ability for