Skip to content

Commit f6133a0

Browse files
committed
update dependencies
1 parent be271b1 commit f6133a0

File tree

12 files changed

+79
-48
lines changed

12 files changed

+79
-48
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ version: 2
22
updates:
33
- package-ecosystem: "gomod"
44
directory: "/"
5+
exclude-paths:
6+
- "_examples/"
57
schedule:
6-
interval: "weekly"
8+
interval: "monthly"
79
- package-ecosystem: "github-actions"
810
directory: "/"
911
schedule:
10-
interval: "weekly"
12+
interval: "monthly"

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
go_version: [1.24.x]
17+
go_version: [1.25.x]
1818
steps:
1919

2020
- name: Set up Go 1.x
21-
uses: actions/setup-go@v5
21+
uses: actions/setup-go@v6
2222
with:
2323
go-version: ${{ matrix.go_version }}
2424

2525
- name: Check out code into the Go module directory
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2727

2828
- name: Test
2929
run: go test -v ./...

_examples/cronjob/go.mod

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
module example
22

3-
go 1.24
3+
go 1.25
44

55
require (
66
github.com/kataras/neffos v0.0.24
7-
github.com/robfig/cron/v3 v3.0.1
7+
github.com/robfig/cron/v3 v3.0.2-0.20210106135023-bc59245fe10e
8+
)
9+
10+
require (
11+
github.com/gobwas/httphead v0.1.0 // indirect
12+
github.com/gobwas/pool v0.2.1 // indirect
13+
github.com/gobwas/ws v1.4.0 // indirect
14+
github.com/google/uuid v1.6.0 // indirect
15+
golang.org/x/sys v0.28.0 // indirect
816
)

_examples/cronjob/go.sum

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_examples/protobuf/user_message.pb.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

conn.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type Conn struct {
4848
// returns the same ID from the request.
4949
serverConnID string
5050
// a context-scope storage, initialized on first `Set`.
51-
store map[string]interface{}
51+
store map[string]any
5252
storeMutex sync.RWMutex
5353

5454
// the gorilla or gobwas socket.
@@ -184,17 +184,17 @@ func (c *Conn) Server() *Server {
184184
}
185185

186186
// Set sets a value to this connection's store.
187-
func (c *Conn) Set(key string, value interface{}) {
187+
func (c *Conn) Set(key string, value any) {
188188
c.storeMutex.Lock()
189189
if c.store == nil {
190-
c.store = make(map[string]interface{})
190+
c.store = make(map[string]any)
191191
}
192192
c.store[key] = value
193193
c.storeMutex.Unlock()
194194
}
195195

196196
// Get retruns a value based on the given "key"
197-
func (c *Conn) Get(key string) interface{} {
197+
func (c *Conn) Get(key string) any {
198198
c.storeMutex.RLock()
199199
if c.store == nil {
200200
c.storeMutex.RUnlock()

conn_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func (s *Struct) SetInjector(fn StructInjector) *Struct {
208208
// Users of this method is `New` and `Dial`.
209209
//
210210
// Note that this method has a tiny performance cost when an event's callback's logic has small footprint.
211-
func NewStruct(ptr interface{}) *Struct {
211+
func NewStruct(ptr any) *Struct {
212212
if ptr == nil {
213213
panic("NewStruct: value is nil")
214214
}

conn_handler_struct_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ type testStructDynamicEmbedded struct {
7777
}
7878

7979
func (s *testStructDynamicEmbedded) OnMyEvent(msg Message) error {
80-
return fmt.Errorf(s.namespace)
80+
return fmt.Errorf("%s", s.namespace)
8181
}
8282

8383
func TestConnHandlerStructDynamicEmbedded(t *testing.T) {

debug.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import (
66
"reflect"
77
)
88

9-
var debugPrinter interface{}
9+
var debugPrinter any
1010

1111
// EnableDebug enables debug and optionally
1212
// sets a custom printer to print out debug messages.
1313
// The "printer" can be any compatible printer such as
1414
// the standard `log.Logger` or a custom one like the `kataras/golog`.
1515
//
1616
// A "printer" is compatible when it contains AT LEAST ONE of the following methods:
17-
// Debugf(string, ...interface{}) or
18-
// Logf(string, ...interface{}) or
19-
// Printf(string, ...interface{})
17+
// Debugf(string, ...any) or
18+
// Logf(string, ...any) or
19+
// Printf(string, ...any)
2020
//
2121
// If EnableDebug is called but the "printer" value is nil
2222
// then neffos will print debug messages through a new log.Logger prefixed with "| neffos |".
@@ -25,7 +25,7 @@ var debugPrinter interface{}
2525
// Therefore enabling the debugger has zero performance cost on up-and-running servers and clients.
2626
//
2727
// There is no way to disable the debug mode on serve-time.
28-
func EnableDebug(printer interface{}) {
28+
func EnableDebug(printer any) {
2929
if debugEnabled() {
3030
Debugf("debug mode is already set")
3131
return
@@ -46,13 +46,13 @@ func EnableDebug(printer interface{}) {
4646

4747
type (
4848
debugfer interface {
49-
Debugf(string, ...interface{})
49+
Debugf(string, ...any)
5050
}
5151
logfer interface {
52-
Logf(string, ...interface{})
52+
Logf(string, ...any)
5353
}
5454
printfer interface {
55-
Printf(string, ...interface{})
55+
Printf(string, ...any)
5656
}
5757
)
5858

@@ -62,7 +62,7 @@ func debugEnabled() bool {
6262

6363
// Debugf prints debug messages to the printer defined on `EnableDebug`.
6464
// Runs only on debug mode.
65-
func Debugf(format string, args ...interface{}) {
65+
func Debugf(format string, args ...any) {
6666
if !debugEnabled() {
6767
return
6868
}
@@ -89,7 +89,7 @@ func Debugf(format string, args ...interface{}) {
8989
}
9090
}
9191

92-
type dargs []interface{}
92+
type dargs []any
9393

9494
// DebugEach prints debug messages for each of "mapOrSlice" elements
9595
// to the printer defined on `EnableDebug`.
@@ -100,7 +100,7 @@ type dargs []interface{}
100100
// fval := f.Interface()
101101
// Debugf("field [%s.%s] will be automatically re-filled with [%T(%s)]", typ.Name(), typ.Field(idx).Name, fval, fval)
102102
// })
103-
func DebugEach(mapOrSlice interface{}, onDebugVisitor interface{}) {
103+
func DebugEach(mapOrSlice any, onDebugVisitor any) {
104104
if !debugEnabled() || onDebugVisitor == nil {
105105
return
106106
}

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
module github.com/kataras/neffos
22

3-
go 1.24
3+
go 1.25
44

55
require (
66
github.com/gobwas/ws v1.4.0
77
github.com/google/uuid v1.6.0
88
github.com/gorilla/websocket v1.5.3
99
github.com/mediocregopher/radix/v3 v3.8.1
10-
github.com/nats-io/nats.go v1.40.1
11-
golang.org/x/sync v0.12.0
10+
github.com/nats-io/nats.go v1.46.0
11+
golang.org/x/sync v0.17.0
1212
)
1313

1414
require (
1515
github.com/gobwas/httphead v0.1.0 // indirect
1616
github.com/gobwas/pool v0.2.1 // indirect
1717
github.com/klauspost/compress v1.18.0 // indirect
18-
github.com/nats-io/nkeys v0.4.9 // indirect
18+
github.com/nats-io/nkeys v0.4.11 // indirect
1919
github.com/nats-io/nuid v1.0.1 // indirect
20-
golang.org/x/crypto v0.31.0 // indirect
21-
golang.org/x/sys v0.28.0 // indirect
22-
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
20+
golang.org/x/crypto v0.42.0 // indirect
21+
golang.org/x/sys v0.36.0 // indirect
22+
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
2323
)

0 commit comments

Comments
 (0)