Skip to content

Commit db2913e

Browse files
committed
Rename NextHeader to ReadHeader
1 parent f01454d commit db2913e

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

formats/sam/sam.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,20 @@ func NewReader(r io.Reader) *Reader {
111111
}
112112

113113
// NextHeader returns the next header line as a raw string, including the '@'.
114-
// Returns EOF when out of header lines, then Next can be called for the
114+
// Returns EOF when out of header lines, then Read can be called for the
115115
// data lines.
116+
//
117+
// Deprecated: use ReadHeader.
116118
func (r *Reader) NextHeader() (string, error) {
119+
return r.ReadHeader()
120+
}
121+
122+
// ReadHeader returns the next header line as a raw string, including the '@'.
123+
// Returns EOF when out of header lines, then Read can be called for the
124+
// data lines.
125+
func (r *Reader) ReadHeader() (string, error) {
117126
if r.h {
118-
panic("Cannot read header after reading alignments.")
127+
panic("cannot read header after reading alignments.")
119128
}
120129
b, err := r.r.ReadByte()
121130
if err != nil {

0 commit comments

Comments
 (0)