mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
fix: rename Seek to SeekOffset fix go vet check issue
This commit is contained in:
4
.github/workflows/codecov.yml
vendored
4
.github/workflows/codecov.yml
vendored
@@ -3,11 +3,9 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# - v2
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
# - v2
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -17,7 +15,7 @@ jobs:
|
||||
fetch-depth: 2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.18"
|
||||
go-version: "1.19"
|
||||
- name: Run coverage
|
||||
run: go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
||||
- name: Run govet
|
||||
|
||||
@@ -65,8 +65,8 @@ func (f *FileReader) Offset() int64 {
|
||||
return f.offset
|
||||
}
|
||||
|
||||
// Seek sets the current offset of the reading
|
||||
func (f *FileReader) Seek(offset int64) error {
|
||||
// SeekOffset sets the current offset of the reading
|
||||
func (f *FileReader) SeekOffset(offset int64) error {
|
||||
_, err := f.file.Seek(offset, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -534,7 +534,7 @@ func TestReadlineFile(t *testing.T) {
|
||||
if !ok {
|
||||
t.Fail()
|
||||
}
|
||||
if err = reader.Seek(offset); err != nil {
|
||||
if err = reader.SeekOffset(offset); err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
lineRead, err := reader.ReadLine()
|
||||
|
||||
Reference in New Issue
Block a user