gura 0.5.5

A Gura configuration language serializer/deserializer for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use gura::{errors::GuraError, parse, GuraType};
use std::fs;

/// Reads a file located in tests/{parent_folder}/tests-files/{file_path} and parses its
/// content to Gura format
pub fn get_file_content_parsed(
    parent_folder: &str,
    file_path: &str,
) -> Result<GuraType, GuraError> {
    let content =
        fs::read_to_string(format!("tests/{}/tests-files/{}", parent_folder, file_path)).unwrap();
    parse(&content)
}