muesli / beehive

A flexible event/agent & automation system with lots of bees 🐝
GNU Affero General Public License v3.0
6.28k stars 319 forks source link

go run beehive.go throws a panic, unkown bee-class in config file #259

Closed tonywangcn closed 5 years ago

tonywangcn commented 5 years ago

When I want to create some customize bee, I prefer "go run beehive.go" to run the project without go build (or make embed in this project).

But it failed with a panic. Here is the cmd. I know it means that it doesn't load the bees correctly, but why it works with the binary version?

How should I fix the error? Thanks!

go run beehive.go -config ./config/beehive.conf -bind 0.0.0.0:8181 -canonicalurl http://localhost:8181 ./beehive -config ./config/beehive.conf -bind 0.0.0.0:8181 -canonicalurl http://localhost:8181

muesli commented 5 years ago

That can't work, as it will exclude 90% of Beehive's code: it will really only parse this one file. You can try go run *.go ... but I'm not even sure that works.

Happy to provide more insight, but as this is nothing Beehive specific and simply how Go works, I'm going to close this.

tonywangcn commented 5 years ago

Thanks! You're right, It works!