Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable server #5

Open
Fastidious opened this issue Jan 17, 2018 · 4 comments
Open

Configurable server #5

Fastidious opened this issue Jan 17, 2018 · 4 comments

Comments

@Fastidious
Copy link

While the server can be entered on the command line, it makes it verbose (too long). Could a configuration file be added instead, so the server can be set in it? If not, where in the code is the server defined?

@Fastidious
Copy link
Author

Found it! Would rather user a cowyodel.cfg instead though.

@schollz
Copy link
Owner

schollz commented Jan 21, 2018

Would you like to add that?

@Fastidious
Copy link
Author

@schollz if I knew, I would. Might read a little by on go and see what I can do.

@schollz
Copy link
Owner

schollz commented Jan 22, 2018

@Fastidious I encourage you to try!

All you need to do is check for the config file, cowyodel.cfg before this line: https://github.com/schollz/cowyodel/blob/master/main.go#L134, and if it exists overwrite the server variable. The easiest thing for config files in Go I think is https://github.com/BurntSushi/toml, but you can use whatever you want. I'm happy to help you, and I can also add in that change (but it may take awhile to get to).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants