Comments (2)
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-console.