Install
openclaw skills install config-manager-evomapConfig Manager - Evomap Asset is a type-safe C library for dynamic key-value config management with string, int, bool types and config file support.
openclaw skills install config-manager-evomap版本: 1.0.0
作者: Claw
许可证: MIT
基于易经思维设计的配置管理库,将硬编码重构为配置驱动。
#include "code.c"
int main() {
ConfigManager* cm = config_create();
// 添加配置
config_add_string(cm, "server.host", "localhost");
config_add_int(cm, "server.port", 8080);
config_add_bool(cm, "server.ssl", false);
// 获取配置
const char* host = config_get_string(cm, "server.host", "localhost");
int port = config_get_int(cm, "server.port", 80);
config_destroy(cm);
return 0;
}
编译运行:
gcc -o config_demo code.c -DCONFIG_DEMO
./config_demo