{"repo":"kkyr/fig","free":true,"listed":false,"github":"https://github.com/kkyr/fig","clone":"git clone https://github.com/kkyr/fig.git","description":"A minimalist Go configuration library","language":"Go","stars":381,"topics":["golang","go","configuration","config-file","configuration-management","environment-variables","environment","yaml","json","toml"],"license":"Apache-2.0","category":"dev-tools","readme_excerpt":"fig fig is a tiny library for loading an application's configuration into a Go struct. Why fig? - 🛠️ Define your configuration , validations and defaults all within a single struct. - 🌍 Easily load your configuration from a file , the environment , or both. - ⏰ Decode strings into Time , Duration , Regexp , or any custom type that satisfies the StringUnmarshaler interface. - 🗂️ Compatible with yaml , json , and toml file formats. - 🧩 Only three external dependencies. Getting Started $ go get -d github.com/kkyr/fig Define your config file: Define your struct along with validations or defaults : Fields marked as required are checked to ensure they're not empty, and default values are applied to fill in those that are empty. Environment By default, fig will only look for values in a config file. To also include values from the environment, use the UseEnv option: In case of conflicts, values from the environment take precedence. Usage See usage examples. Documentation For detailed documentation, visit go.dev. Contributing PRs are welcome! Please explain your motivation for the change in your PR and ensure your change is properly tested and documented.","default_branch":null,"files":null,"tree":[],"storefront":"/r/kkyr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kkyr/fig/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}