diff options
Diffstat (limited to 'libgo/go/debug/pe/string.go')
-rw-r--r-- | libgo/go/debug/pe/string.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libgo/go/debug/pe/string.go b/libgo/go/debug/pe/string.go index 69837f6d019..c30255f341a 100644 --- a/libgo/go/debug/pe/string.go +++ b/libgo/go/debug/pe/string.go @@ -1,4 +1,4 @@ -// Copyright 2016 The Go Authors. All rights reserved. +// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -19,16 +19,16 @@ func cstring(b []byte) string { return string(b[:i]) } -// _StringTable is a COFF string table. -type _StringTable []byte +// StringTable is a COFF string table. +type StringTable []byte -func readStringTable(fh *FileHeader, r io.ReadSeeker) (_StringTable, error) { +func readStringTable(fh *FileHeader, r io.ReadSeeker) (StringTable, error) { // COFF string table is located right after COFF symbol table. if fh.PointerToSymbolTable <= 0 { return nil, nil } offset := fh.PointerToSymbolTable + COFFSymbolSize*fh.NumberOfSymbols - _, err := r.Seek(int64(offset), io.SeekStart) + _, err := r.Seek(int64(offset), seekStart) if err != nil { return nil, fmt.Errorf("fail to seek to string table: %v", err) } @@ -47,13 +47,13 @@ func readStringTable(fh *FileHeader, r io.ReadSeeker) (_StringTable, error) { if err != nil { return nil, fmt.Errorf("fail to read string table: %v", err) } - return _StringTable(buf), nil + return StringTable(buf), nil } // TODO(brainman): decide if start parameter should be int instead of uint32 // String extracts string from COFF string table st at offset start. -func (st _StringTable) String(start uint32) (string, error) { +func (st StringTable) String(start uint32) (string, error) { // start includes 4 bytes of string table length if start < 4 { return "", fmt.Errorf("offset %d is before the start of string table", start) |