mirror of https://github.com/golang/go.git
runtime: fix case in KeepAlive comment
Fixes #16299. Change-Id: I76f541c7f11edb625df566f2f1035147b8bcd9dd Reviewed-on: https://go-review.googlesource.com/24830 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
915398f14f
commit
12f2b4ff0e
|
|
@ -450,7 +450,7 @@ func findObject(v unsafe.Pointer) (s *mspan, x unsafe.Pointer, n uintptr) {
|
|||
// type File struct { d int }
|
||||
// d, err := syscall.Open("/file/path", syscall.O_RDONLY, 0)
|
||||
// // ... do something if err != nil ...
|
||||
// p := &FILE{d}
|
||||
// p := &File{d}
|
||||
// runtime.SetFinalizer(p, func(p *File) { syscall.Close(p.d) })
|
||||
// var buf [10]byte
|
||||
// n, err := syscall.Read(p.d, buf[:])
|
||||
|
|
|
|||
Loading…
Reference in New Issue