created configuration module
This commit is contained in:
7
src/configuration.rs
Normal file
7
src/configuration.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
//! File: configuration.rs
|
||||
//! Description: Definition file for the configuration namespace
|
||||
//! Author:Jali <jali@orca-central.de>
|
||||
//! 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;
|
||||
15
src/configuration/settings.rs
Normal file
15
src/configuration/settings.rs
Normal file
@@ -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 <jali@orca-central.de>
|
||||
//! 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<String>,
|
||||
Port: i32,
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user