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/actions/setup-go/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
go-version:
description: 'Go version to use'
required: false
default: '1.24'
default: '1.25'
cache:
description: 'Enable Go module cache'
required: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24']
go-version: ['1.25']

steps:
- name: Checkout code
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24']
go-version: ['1.25']

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Go
uses: ./.github/actions/setup-go
with:
go-version: '1.24'
go-version: '1.25'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module github.com/8thgencore/valchemy

go 1.24.5
go 1.25.6

require (
github.com/alecthomas/kong v1.12.0
github.com/alecthomas/kong v1.14.0
github.com/golang-cz/devslog v0.0.15
github.com/ilyakaznacheev/cleanenv v1.5.0
github.com/stretchr/testify v1.10.0
github.com/stretchr/testify v1.11.1
)

require (
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand Down
20 changes: 8 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk=
github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0=
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/kong v1.10.0 h1:8K4rGDpT7Iu+jEXCIJUeKqvpwZHbsFRoebLbnzlmrpw=
github.com/alecthomas/kong v1.10.0/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
github.com/alecthomas/kong v1.12.0 h1:oKd/0fHSdajj5PfGDd3ScvEvpVJf9mT2mb5r9xYadYM=
github.com/alecthomas/kong v1.12.0/go.mod h1:p2vqieVMeTAnaC83txKtXe8FLke2X07aruPWXyMPQrU=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/kong v1.14.0 h1:gFgEUZWu2ZmZ+UhyZ1bDhuutbKN1nTtJTwh19Wsn21s=
github.com/alecthomas/kong v1.14.0/go.mod h1:wrlbXem1CWqUV5Vbmss5ISYhsVPkBb1Yo7YKJghju2I=
github.com/alecthomas/repr v0.5.2 h1:SU73FTI9D1P5UNtvseffFSGmdNci/O6RsqzeXJtP0Qs=
github.com/alecthomas/repr v0.5.2/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang-cz/devslog v0.0.13 h1:JkJ6PPNSOCBpYyU03v3xw7WgpChQ3AYFqgRbYBhUk/Y=
github.com/golang-cz/devslog v0.0.13/go.mod h1:bSe5bm0A7Nyfqtijf1OMNgVJHlWEuVSXnkuASiE1vV8=
github.com/golang-cz/devslog v0.0.15 h1:ejoBLTCwJHWGbAmDf2fyTJJQO3AkzcPjw8SC9LaOQMI=
github.com/golang-cz/devslog v0.0.15/go.mod h1:bSe5bm0A7Nyfqtijf1OMNgVJHlWEuVSXnkuASiE1vV8=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
Expand All @@ -23,8 +19,8 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
4 changes: 2 additions & 2 deletions internal/config/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ func parseSize(sizeStr string) (uint64, error) {
found := false

for _, s := range suffixes {
if strings.HasSuffix(sizeStr, s.suffix) {
numStr = strings.TrimSuffix(sizeStr, s.suffix)
if before, ok := strings.CutSuffix(sizeStr, s.suffix); ok {
numStr = before
mult = s.mult
found = true
break
Expand Down
1 change: 0 additions & 1 deletion internal/replication/replication_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !unit
// +build !unit

package replication

Expand Down
2 changes: 1 addition & 1 deletion internal/storage/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func NewEngine(log *slog.Logger, w wal.WAL) *Engine {
}

// Initialize partitions
for i := 0; i < defaultNumShards; i++ {
for i := range defaultNumShards {
e.partitions[i] = &partition{
data: make(map[string]string),
}
Expand Down
8 changes: 4 additions & 4 deletions internal/storage/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ func TestEngine(t *testing.T) {
const iterations = 100

go func() {
for i := 0; i < iterations; i++ {
for i := range iterations {
_ = engine.Set(fmt.Sprintf("key%d", i), "value")
engine.Get(fmt.Sprintf("key%d", i))
}
done <- true
}()

go func() {
for i := 0; i < iterations; i++ {
for i := range iterations {
engine.Get(fmt.Sprintf("key%d", i))
_ = engine.Delete(fmt.Sprintf("key%d", i))
}
Expand All @@ -150,15 +150,15 @@ func TestEngine(t *testing.T) {

go func() {
defer wg.Done()
for i := 0; i < iterations; i++ {
for i := range iterations {
err := engine.Set("key", fmt.Sprintf("value1_%d", i))
require.NoError(t, err)
}
}()

go func() {
defer wg.Done()
for i := 0; i < iterations; i++ {
for i := range iterations {
err := engine.Set("key", fmt.Sprintf("value2_%d", i))
require.NoError(t, err)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/wal/segment/segment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestListSegments(t *testing.T) {
defer os.RemoveAll(dir)

// Create several segments
for i := 0; i < 3; i++ {
for range 3 {
s, err := NewSegment(dir)
require.NoError(t, err)
err = s.CreateSegmentFile()
Expand Down
4 changes: 2 additions & 2 deletions internal/wal/wal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func TestWrite(t *testing.T) {
numWrites := 20

wg.Add(numWrites)
for i := 0; i < numWrites; i++ {
for i := range numWrites {
go func(i int) {
defer wg.Done()
err := tw.wal.Write(entry.Entry{
Expand Down Expand Up @@ -446,7 +446,7 @@ func TestSegmentRotation(t *testing.T) {
numEntries := 5
written := make(map[string]bool)

for i := 0; i < numEntries; i++ {
for i := range numEntries {
key := string(rune(i))
err := w.Write(entry.Entry{
Operation: entry.OperationSet,
Expand Down
Loading