GoSlice icon indicating copy to clipboard operation
GoSlice copied to clipboard

Load Options from file

Open galamdring opened this issue 4 years ago • 1 comments

Being able to store custom settings in files would be a first step toward supporting profiles for different printers/filaments.

Implementation would look like adding a command line flag that loads into a struct that has a set method that configures all of the options.

YAML would be a solid format for this, and many apps are moving in this direction for configuration files.

galamdring avatar Oct 20 '21 00:10 galamdring

Thanks for the suggestion :-) For this I would suggest to use https://github.com/spf13/viper it supports different filetypes, including yaml. (from the same dev as github.com/spf13/pflag which I also use in this project for the cli options. Maybe these can be combined in a nice way.) Important is that the command line usage is kept the same to avoid breaking changes (for now) (at least one project I know of calls GoSlice through command line options.)

aligator avatar Oct 20 '21 12:10 aligator