How to run 1.6 cp example?
ParkerOu opened this issue · 3 comments
ParkerOu commented
I'm new to golang. How could I run 1.6 cp example?
test version: latest main(3ecaf00) and v0.16.0
golang version: go1.20.3 windows/amd64
Use Windows 10
go run .\example\1.6\cp\charge_point_sim.go
result:
# command-line-arguments
example\1.6\cp\charge_point_sim.go:74:67: undefined: ChargePointHandler
example\1.6\cp\charge_point_sim.go:79:2: undefined: checkError
example\1.6\cp\charge_point_sim.go:82:2: undefined: updateStatus
example\1.6\cp\charge_point_sim.go:87:2: undefined: checkError
example\1.6\cp\charge_point_sim.go:88:90: undefined: getExpiryDate
example\1.6\cp\charge_point_sim.go:90:2: undefined: updateStatus
example\1.6\cp\charge_point_sim.go:93:2: undefined: checkError
example\1.6\cp\charge_point_sim.go:94:133: undefined: getExpiryDate
example\1.6\cp\charge_point_sim.go:97:2: undefined: updateStatus
example\1.6\cp\charge_point_sim.go:100:59: undefined: MeterValueSampleInterval
example\1.6\cp\charge_point_sim.go:100:59: too many errors
UBT-FJ commented
I made it run like this:
go run ./example/1.6/cp/*.go
lorenzodonini commented
The package is not found, most likely due to GOPATH issues. Maybe try running a go mod download && go build <example>
.
You may also run the docker containers directly, if you just want to try out the functionality.
ParkerOu commented
The package is not found, most likely due to GOPATH issues. Maybe try running a
go mod download && go build <example>
.
Still the same error.
You may also run the docker containers directly, if you just want to try out the functionality.
Thanks for the replay. I'll try it with docker.