summaryrefslogtreecommitdiff
path: root/src/pkg/unsafe/unsafe.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-07 11:55:06 -0700
committerRuss Cox <rsc@golang.org>2009-10-07 11:55:06 -0700
commit2b77e59eaed6d039951b5ef7ad1f3db421962dc2 (patch)
tree10feec844f56ec9dce304804c581d9c5209e74c1 /src/pkg/unsafe/unsafe.go
parent5843e5da3dca981d5b2522a3be91bd1426c71d26 (diff)
downloadgolang-2b77e59eaed6d039951b5ef7ad1f3db421962dc2.tar.gz
apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync syscall testing time unicode unsafe utf8
R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
Diffstat (limited to 'src/pkg/unsafe/unsafe.go')
-rw-r--r--src/pkg/unsafe/unsafe.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/unsafe/unsafe.go b/src/pkg/unsafe/unsafe.go
index b2d9a5ab7..c9b8c9a07 100644
--- a/src/pkg/unsafe/unsafe.go
+++ b/src/pkg/unsafe/unsafe.go
@@ -18,30 +18,30 @@ type ArbitraryType int
// 3) A Pointer can be converted to a uintptr.
// Pointer therefore allows a program to defeat the type system and read and write
// arbitrary memory. It should be used with extreme care.
-type Pointer *ArbitraryType
+type Pointer *ArbitraryType
// Sizeof returns the size in bytes occupied by the value v. The size is that of the
// "top level" of the value only. For instance, if v is a slice, it returns the size of
// the slice descriptor, not the size of the memory referenced by the slice.
-func Sizeof(v ArbitraryType) int
+func Sizeof(v ArbitraryType) int
// Offsetof returns the offset within the struct of the field represented by v,
// which must be of the form struct_value.field. In other words, it returns the
// number of bytes between the start of the struct and the start of the field.
-func Offsetof(v ArbitraryType) int
+func Offsetof(v ArbitraryType) int
// Alignof returns the alignment of the value v. It is the minimum value m such
// that the address of a variable with the type of v will always always be zero mod m.
// If v is of the form obj.f, it returns the alignment of field f within struct object obj.
-func Alignof(v ArbitraryType) int
+func Alignof(v ArbitraryType) int
// Typeof returns the type of an interface value, a runtime.Type.
-func Typeof(i interface {}) (typ interface {})
+func Typeof(i interface{}) (typ interface{})
// Reflect unpacks an interface value into its type and the address of a copy of the
// internal value.
-func Reflect(i interface {}) (typ interface {}, addr uintptr)
+func Reflect(i interface{}) (typ interface{}, addr uintptr)
// Unreflect inverts Reflect: Given a type and a pointer, it returns an empty interface value
// with those contents.
-func Unreflect(typ interface {}, addr uintptr) (ret interface {})
+func Unreflect(typ interface{}, addr uintptr) (ret interface{})