paked / messenger

Package messenger is used for making bots for use with Facebook messenger
MIT License
274 stars 72 forks source link

Allow use of a config file #52

Closed OAyomide closed 5 years ago

OAyomide commented 5 years ago

I think it is a good idea to allow people to use a config file. This allows separation of concern and you can be guaranteed that the configurations are in a separate file and can be changed at will.

Makes good for better dev experience. I have a PR for this :upside_down_face:

albttx commented 5 years ago

I don't think it's a good idea, this project is a go package, not a program (understand here "main package")

The main package parse the config, as yaml or wathever, and then fill the messenger.Option struct

paked commented 5 years ago

I agree with Albert.

Loading of configuration should be separate from the library.

On Wed, 2 Jan 2019 at 8:08 am, Albert Le Batteux notifications@github.com wrote:

I don't think it's a good idea, this project is a go package, not a program (understand here "main package")

The main package parse the config, as yaml or wathever, and then fill the messenger.Option struct

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/paked/messenger/issues/52#issuecomment-450756954, or mute the thread https://github.com/notifications/unsubscribe-auth/AIBJSugh1wSpqsPId3tvznRTRP1FqZ3gks5u-84zgaJpZM4ZlBQr .

-- Harrison Shoebridge https://harrison.tech