diff --git a/src/configuration.rs b/src/configuration.rs new file mode 100644 index 0000000..1342e14 --- /dev/null +++ b/src/configuration.rs @@ -0,0 +1,7 @@ +//! File: configuration.rs +//! Description: Definition file for the configuration namespace +//! Author:Jali +//! Created On: Tue 04 Jun 2019 10:06:53 pm CEST +//! Last Modified: Tue 04 Jun 2019 10:06:53 pm CEST + +pub mod configuration; diff --git a/src/configuration/settings.rs b/src/configuration/settings.rs new file mode 100644 index 0000000..8475caf --- /dev/null +++ b/src/configuration/settings.rs @@ -0,0 +1,15 @@ +//! File: settings.rs +//! Description: Defines a stuct that holds all of the configuration settings passed to the program +//! by command line. +//! Author: Jali +//! Created On: Tue 04 Jun 2019 10:30:46 pm CEST +//! Last Modified: TIMESTAMP + +/** + * Defines a data stucture to to store the configuration in. + */ +pub struct settings { + Foreground: bool, + Plugins: Vec, + Port: i32, +} diff --git a/src/main.rs b/src/main.rs index 39b6946..d7dbba0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ fn main() { * server lines */ fn parse_command_line<'a>() -> ArgMatches<'a> { - App::new("gopherbridge") + return App::new("gopherbridge") .version("0.1") .author("jali@orca-central.de") .about("a simple modular gopher server, that pushes converted web-content to a client") @@ -53,5 +53,5 @@ fn parse_command_line<'a>() -> ArgMatches<'a> { .help("Specifies the port the server listens on. Default is 70") .takes_value(true), ) - .get_matches() + .get_matches(); }