GithubHelp home page GithubHelp logo

Comments (2)

DrSmithFr avatar DrSmithFr commented on June 12, 2024 1

Hi,

Thanks for the return, indeed the output wasn't proprely cascaded from Command to Child Scripts instances.
It's solved with the 1.4.1.

Your example work properly now.

To give you more detail of the internal process:

  • if you did not defined the Output (or set it to nil) on your instance of go_console.Command, it will generated for you the default ConsoleOutput (calling NewCliOutput(true, nil)).
  • if you did defined the Output on your instance of go_console.Command, it will be set as default Output for all childs Script. (note: you still can overwrite the Script output inside your runner func)

from go-console.

finicu212 avatar finicu212 commented on June 12, 2024

ahh. My bad, I managed to fix it: Basically, both script and each of the Scripts within script can have an Output. Setting the script.Output didn't seem to do much, and was panicking. But, setting the output of the individual script item (i.e. script.Scripts[0].Output for instance) actually fixes this problem.

But, it's a bit unusual to have these fields duplicated both on parent and on child object. I was thinking that, if script.Scripts[0].Output is nil, then it would look for a valid Object from its parent, script.Output

from go-console.

Related Issues (3)

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.