Giter Club home page Giter Club logo

Comments (4)

relistan avatar relistan commented on June 21, 2024 2

I think @AlekSi might be trying to solve the problem of "What the heck actually got applied from the env vars I passed" because it can be challenging to figure out which were actually picked up. I wrote a thing which we use to solve that: https://github.com/relistan/rubberneck

Configure your app with envconfig, and then on startup have it dump the config it's running from to the logs. You could also do this from a CLI switch if needed. I find it useful. Maybe it solves this problem and it doesn't need to be solved in envconfig. You could alternatively dump a TOML or YAML file from your config struct if you don't like Rubberneck.

from envconfig.

teepark avatar teepark commented on June 21, 2024

This seems like a debugging use case? I can understand applications needing to:

  1. parse configuration from the environment
  2. print helpful output documenting supported environment vars and their types

I'm trying to wrap my head around the need for this or find precedent anywhere else. It would be like if someapp -t -a -N 2 -h printed help output informing the user that they activated the "t" and "a" flags, and that the "N" value is 2.

from envconfig.

teepark avatar teepark commented on June 21, 2024

@relistan that package looks great! I agree it's not really the job of envconfig -- I'll be pointing people to rubberneck next time this comes up.

from envconfig.

relistan avatar relistan commented on June 21, 2024

Thanks @teepark!

from envconfig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.