Giter Club home page Giter Club logo

Comments (6)

anuraaga avatar anuraaga commented on August 17, 2024

I suspect that it will also be natural to fix the issue that config can only be passed as global variables right now. This is awkward when running tests programmatically. I had added some config knobs related to HTTP previously but probably all the config should be merged into that, with the CLI passing in values same as it currently does.

from go-ftw.

fzipi avatar fzipi commented on August 17, 2024

What about

func NewConfigFromString(conf string) error {
for testing?

from go-ftw.

anuraaga avatar anuraaga commented on August 17, 2024

Global variables are awkward to use programmatically, these functions being called new but not returning any actual config seems to show that they aren't very idiomatic.

The biggest problem would be to run multiple ftw in parallel which seems reasonable to support.

from go-ftw.

theseion avatar theseion commented on August 17, 2024

What I was going for was a function that can is used by both the commands and the tests. With NewConfigFromString we would just repeat the default values for the tests. I don't like repeating defaults in different places, that always comes back to haunt you.

from go-ftw.

fzipi avatar fzipi commented on August 17, 2024

Following #123 merge, I think we can now move to the second part of this fix. I guess adding the command line config variables that will affect all tests to the config is the right choice?

from go-ftw.

theseion avatar theseion commented on August 17, 2024

Yes, I think so.

from go-ftw.

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.