Module loader

Module loader 

Source
Expand description

Configuration file loading

This module provides functions to load configuration from YAML or JSON files, with automatic format detection.

§Supported Formats

  • YAML (.yaml, .yml)
  • JSON (.json)

§Example

use dynamic_cli::config::loader::load_config;
use std::path::Path;

let config = load_config("commands.yaml").unwrap();
println!("Loaded {} commands", config.commands.len());

Functions§

load_config
Load configuration from a file
load_json
Load configuration from a JSON string
load_yaml
Load configuration from a YAML string