We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.trace
std.trace(str, rest) outputs the given string str to stderr and returns rest as the result.
std.trace(str, rest)
str
rest
Example:
local conditionalReturn(cond, in1, in2) = if (cond) then std.trace('cond is true returning ' + std.toString(in1), in1) else std.trace('cond is false returning ' + std.toString(in2), in2); { a: conditionalReturn(true, { b: true }, { c: false }), }
Prints:
TRACE: test.jsonnet:3 cond is true returning {"b": true} { "a": { "b": true } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
std.trace(str, rest)
outputs the given stringstr
to stderr and returnsrest
as the result.Example:
Prints:
The text was updated successfully, but these errors were encountered: