Closed Shakirsadiq6 closed 2 years ago
On master branch the function is defined, so the error doesn't make any sense to me. I would need to get some more context. Could you please share the offending code snippet (including the imports ideally)?
Actually, I cloned this whole repository and It worked fine. But If I use the code from the examples folder only. I face this error even without a single change in the code. However, commenting on the ws.SetLogger line makes the code work again. But I wanted to establish that WS connection between CP and CS.
Currently, master branch isn't the one, that is fetched by go get. The code with latest tag - 0.15.0 is outdated. You can tell go to directly use master branch instead of the latest tag by executing go get github.com/lorenzodonini/ocpp-go/ocpp1.6@master
. this fixed the issue for me.
I just released v0.16.0, which contains all the fixes currently on master branch. That way, you won't have to specify the branch anymore.
@Shakirsadiq6 can you check, if this solves your issues?
@lorenzodonini Thanks.
Why I'm facing this issue? SetLogger is a function defined in the WS package. I took the example code for CS and CP but everything is working except this WebSockets package. What is the issue and what I'm doing wrong?