lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go
MIT License
262 stars 125 forks source link

NewGetConfigurationConfirmation does not have UnknownKey as function argument #101

Closed xBlaz3kx closed 3 years ago

xBlaz3kx commented 3 years ago

I have the latest version (v0.14.0) and I've noticed there's an missing argument UnknownKey in core.NewGetConfigurationConfirmation, when handling the CSMS' GetConfigurationRequest.

Also, I've noticed the documentation mentions the wrong response message.

image

lorenzodonini commented 3 years ago

Hello, optional values are not within the constructor method signature (this was done on purpose throughout the library, since several messages have a ton of optional values, which many might not care about).

If you wish to set the UnknownKey field, you can simply set it after creating the GetConfigurationConfirmation struct. All message fields are exported and you may set/modify them at will.

Thanks for spotting the copy/paste error in the docs, will take care of it 😃