diff --git a/README.md b/README.md index e59ae76..f94bacb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ## Requirements -- Go 1.21+ +- Go 1.20+ ## 🚀 Install diff --git a/examples/client/client.go b/examples/client/client.go index 4a50584..fbfb39c 100644 --- a/examples/client/client.go +++ b/examples/client/client.go @@ -1,11 +1,12 @@ package main import ( - "log/slog" "os" "os/signal" "syscall" + "golang.org/x/exp/slog" + "github.com/libgox/addr" "github.com/protocol-laboratory/opcua-go/opcua" "github.com/protocol-laboratory/opcua-go/opcua/ua" diff --git a/examples/server/server.go b/examples/server/server.go index ff6d610..dbe7d5a 100644 --- a/examples/server/server.go +++ b/examples/server/server.go @@ -1,12 +1,13 @@ package main import ( - "log/slog" "os" "os/signal" "syscall" "time" + "golang.org/x/exp/slog" + "github.com/protocol-laboratory/opcua-go/opcua" ) diff --git a/go.mod b/go.mod index 22160a2..9227d51 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,12 @@ module github.com/protocol-laboratory/opcua-go -go 1.21 +go 1.20 require ( github.com/libgox/addr v0.2.0 github.com/libgox/buffer v0.0.0-20241015042438-2a8f016fc865 github.com/stretchr/testify v1.9.0 + golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 ) require ( diff --git a/go.sum b/go.sum index e6de942..f05ef50 100644 --- a/go.sum +++ b/go.sum @@ -8,6 +8,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA= +golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ= 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= diff --git a/opcua/client.go b/opcua/client.go index ac6c5e1..540f08d 100644 --- a/opcua/client.go +++ b/opcua/client.go @@ -5,10 +5,11 @@ import ( "crypto/tls" "encoding/binary" "fmt" - "log/slog" "net" "sync" + "golang.org/x/exp/slog" + "github.com/libgox/addr" "github.com/libgox/buffer" diff --git a/opcua/secure_channel.go b/opcua/secure_channel.go index 80bd01a..92e3be5 100644 --- a/opcua/secure_channel.go +++ b/opcua/secure_channel.go @@ -2,9 +2,10 @@ package opcua import ( "errors" - "log/slog" "sync/atomic" + "golang.org/x/exp/slog" + "github.com/protocol-laboratory/opcua-go/opcua/enc" "github.com/protocol-laboratory/opcua-go/opcua/uamsg" "github.com/protocol-laboratory/opcua-go/opcua/util" diff --git a/opcua/server.go b/opcua/server.go index 1a89590..47e0076 100644 --- a/opcua/server.go +++ b/opcua/server.go @@ -2,11 +2,12 @@ package opcua import ( "fmt" - "log/slog" "net" "sync" "time" + "golang.org/x/exp/slog" + "github.com/libgox/buffer" ) diff --git a/opcua/server_test.go b/opcua/server_test.go index ebf8e7f..d926a7c 100644 --- a/opcua/server_test.go +++ b/opcua/server_test.go @@ -1,9 +1,10 @@ package opcua import ( - "log/slog" "testing" + "golang.org/x/exp/slog" + "github.com/libgox/addr" "github.com/protocol-laboratory/opcua-go/opcua/ua" "github.com/stretchr/testify/assert"