Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.22.11' ]
go: [ '1.23.8' ]
steps:
- uses: actions/checkout@v3

Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/codeql.yml

This file was deleted.

3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

run:
go: "1.22.11"
go: "1.23.8"
concurrency: 4
timeout: 5m
tests: false
Expand Down Expand Up @@ -205,7 +205,6 @@ linters:
- nilerr
- errorlint
- bodyclose
- exportloopref
- gosec
- lll
fast: false
16 changes: 9 additions & 7 deletions data/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@ func NewBuffer(size int) *Buffer {
}

func (v *Buffer) Reset() {
for i := 0; i < v.Size(); i++ {
v.buf[i] = 0
l := len(v.buf)
if l > 5e6 {
v.buf = v.buf[:0:5e6]
} else {
v.buf = v.buf[:0]
}
v.buf = v.buf[:0]
v.pos = 0
}

Expand Down Expand Up @@ -151,12 +153,12 @@ func (v *Buffer) WriteAt(b []byte, off int64) (int, error) {
off = 0
}

if len(b)+int(off) > v.Size() {
v.buf = append(v.buf[:off], b...)
} else {
copy(v.buf[off:], b[:])
if add := len(b) + int(off) - v.Size(); add > 0 {
v.buf = append(v.buf, make([]byte, add)...)
}

copy(v.buf[off:], b[:])

return len(b), nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.osspkg.com/ioutils

go 1.22.11
go 1.23.8

require (
go.osspkg.com/casecheck v0.3.0
Expand Down