kcl-lang / kcl-lang.io

KCL Website and Documentation Repo: https://kcl-lang.io
https://kcl-lang.github.io
Apache License 2.0
13 stars 34 forks source link

[FAQ] How do we output fields with leading underscores #476

Open Peefy opened 2 hours ago

Peefy commented 2 hours ago

Q: How do we output fields with leading underscores A: We can use the --show-hidden/-H flag when use the KCL CLI to run KCL files. e.g.

a = 1
_b = 2

The output maybe as follows with the command kcl run main.k -H

a: 1
_b: 2