chore: add src
This commit is contained in:
parent
c3e9b36430
commit
44abbb1012
18
Cargo.toml
Normal file
18
Cargo.toml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[package]
|
||||||
|
name = "lib_tests"
|
||||||
|
version = "0.1.0"
|
||||||
|
authors = ["JesusPerez <jpl@jesusperez.pro>"]
|
||||||
|
edition = "2018"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
anyhow = "1.0.40"
|
||||||
|
envmnt = "0.9.0"
|
||||||
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
serde_derive = "1.0.125"
|
||||||
|
serde_json = "1.0.64"
|
||||||
|
serde_yaml = "0.8.17"
|
||||||
|
toml = "0.5.8"
|
||||||
|
|
||||||
|
[dev-dependencies]
|
||||||
|
#pretty_assertions = "0.6.1"
|
||||||
|
# test-case = "1.1.0"
|
5
TODO.md
Normal file
5
TODO.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
### Test library
|
||||||
|
|
||||||
|
- [ ] Implement more tests
|
||||||
|
|
||||||
|
- [ ] Use [Test Case](https://github.com/frondeus/test-case)
|
13
src/lib.rs
Normal file
13
src/lib.rs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
use dsc::{
|
||||||
|
utils::load_fs_content,
|
||||||
|
};
|
||||||
|
|
||||||
|
use anyhow::{Result};
|
||||||
|
|
||||||
|
pub fn load_fs_data_content() -> Result<String> {
|
||||||
|
let data_path = &envmnt::get_or("DATA_PATH", ".");
|
||||||
|
let data_target = &envmnt::get_or("DATA_TARGET", "data");
|
||||||
|
let data_frmt = &envmnt::get_or("DATA_FORMAT", "yaml");
|
||||||
|
println!("Data path: {} in {} format.", &data_path, &data_frmt);
|
||||||
|
Ok(load_fs_content(&data_path, &data_target, &data_frmt))
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user