Commit 196b9ce8 authored by Will Korteland's avatar Will Korteland

WIP push

parent 048d46b4
Pipeline #196 passed with stage
in 4 minutes and 20 seconds
use ansi_term::Colour;
use std::collections::HashSet;
use std::error::Error;
use std::io::Read;
use std::fs::File;
use toml::Value;
pub struct GlobalConfig {
pub warn: HashSet<String>,
......@@ -29,5 +32,11 @@ pub struct Config {
pub fn load(filename: &str) -> Result<Config, Box<Error>> {
Err(From::from("not implemented yet"))
let mut file = File::open(filename)?;
let mut contents = String::new();
file.read_to_string(&mut contents)?;
let cfg = contents.parse::<Value>()?;
......@@ -2,13 +2,16 @@
extern crate ansi_term;
extern crate clap;
extern crate toml;
mod config;
use clap::{Arg, App};
use std::env;
fn main() {
let default_conf_location = "~/.config/vfilt.toml";
let default_conf_location = "/home/will/.config/vfilt.toml";
let matches = App::new(env!("CARGO_PKG_NAME"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment