Description:
I'm currently using Tengo scripts for configuration management in my application. I have a central configuration script (base.tengo) that defines global settings like whether certain features (e.g., MySQL, Redis) should be enabled or not. I then have separate environment-specific scripts (dev.tengo and prod.tengo) that use these global settings to set up connection parameters for different environments.
Here's the structure:
config/base.tengo (Defines global settings)
config/dev.tengo (Specific settings for the development environment)
config/prod.tengo (Specific settings for the production environment)
main.go (Runs the configuration updater)
However, I'm facing an issue where I want to control these global settings in the base.tengo script and share them with the environment-specific scripts (dev.tengo, prod.tengo) without having to modify main.go. In other words, I want to achieve centralized configuration management and share these settings among the different Tengo scripts.
Currently, I'm facing difficulties in importing the global settings from base.tengo into dev.tengo and prod.tengo. The import paths seem to be causing issues, and I'm looking for a way to share these settings across different scripts seamlessly.
Is there a recommended approach or any updates planned that would enable centralized configuration management and sharing of variables among separate Tengo scripts? This would greatly improve the maintainability and flexibility of the configuration setup.
Description: I'm currently using Tengo scripts for configuration management in my application. I have a central configuration script (base.tengo) that defines global settings like whether certain features (e.g., MySQL, Redis) should be enabled or not. I then have separate environment-specific scripts (dev.tengo and prod.tengo) that use these global settings to set up connection parameters for different environments.
Here's the structure:
config/base.tengo (Defines global settings) config/dev.tengo (Specific settings for the development environment) config/prod.tengo (Specific settings for the production environment) main.go (Runs the configuration updater) However, I'm facing an issue where I want to control these global settings in the base.tengo script and share them with the environment-specific scripts (dev.tengo, prod.tengo) without having to modify main.go. In other words, I want to achieve centralized configuration management and share these settings among the different Tengo scripts.
Currently, I'm facing difficulties in importing the global settings from base.tengo into dev.tengo and prod.tengo. The import paths seem to be causing issues, and I'm looking for a way to share these settings across different scripts seamlessly.
MyCode:
config/base.tengo
config/dev.tengo
Is there a recommended approach or any updates planned that would enable centralized configuration management and sharing of variables among separate Tengo scripts? This would greatly improve the maintainability and flexibility of the configuration setup.
Thank you for your time and consideration!