Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cmd/internal/goobj: remove unused fields of Reader #47085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
qingyunha wants to merge 2 commits into golang:master
base: master
Choose a base branch
Loading
from qingyunha:goobj
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/cmd/internal/goobj/objfile.go
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,12 @@
package goobj

import (
"bytes"
"cmd/internal/bio"
"crypto/sha1"
"encoding/binary"
"errors"
"fmt"
"internal/unsafeheader"
"io"
"unsafe"
)

Expand Down Expand Up @@ -589,16 +587,14 @@ func (w *Writer) Offset() uint32 {
}

type Reader struct {
b []byte // mmapped bytes, if not nil
b []byte
readonly bool // whether b is backed with read-only memory

rd io.ReaderAt
start uint32
h Header // keep block offsets
h Header // keep block offsets
}

func NewReaderFromBytes(b []byte, readonly bool) *Reader {
r := &Reader{b: b, readonly: readonly, rd: bytes.NewReader(b), start: 0}
r := &Reader{b: b, readonly: readonly}
err := r.h.Read(r)
if err != nil {
return nil
Expand Down

AltStyle によって変換されたページ (->オリジナル) /