Replace interface{} with any type alias

This change maintains full backward compatibility while adopting
modern Go type alias conventions for better code clarity.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
This commit is contained in:
Xiaobo Liu
2025-06-14 16:43:59 +08:00
parent bbb9792ca9
commit eef8d96d36
6 changed files with 21 additions and 21 deletions

View File

@@ -206,7 +206,7 @@ func TestActiveTCP_NonBlocking(t *testing.T) {
require.NoError(t, bAgent.Close())
}()
isConnected := make(chan interface{})
isConnected := make(chan any)
err = aAgent.OnConnectionStateChange(func(c ConnectionState) {
if c == ConnectionStateConnected {
close(isConnected)
@@ -269,7 +269,7 @@ func TestActiveTCP_Respect_NetworkTypes(t *testing.T) {
require.NoError(t, bAgent.Close())
}()
isConnected := make(chan interface{})
isConnected := make(chan any)
err = aAgent.OnConnectionStateChange(func(c ConnectionState) {
if c == ConnectionStateConnected {
close(isConnected)