Skip to content

Commit cfed222

Browse files
committed
Adds hidden parameter FAQ
Signed-off-by: Darkhood148 <ujjwal.sharma9999999@gmail.com>
1 parent 13eedac commit cfed222

File tree

1 file changed

+16
-0
lines changed
  • versioned_docs/version-0.11/user_docs/support

1 file changed

+16
-0
lines changed

versioned_docs/version-0.11/user_docs/support/faq-kcl.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,3 +2703,19 @@ Key Differences:
27032703
- Immutability: KCL emphasizes immutability, which influences how mixins and protocols are used, making them more suitable for declarative configurations.
27042704

27052705
In summary, KCL's mixins and protocols combine concepts from various programming languages but are optimized for configuration management and policy definition, providing a powerful and flexible way to construct and validate complex data structures.
2706+
2707+
## 70. How do we output fields with leading underscores?
2708+
2709+
We can use the `--show-hidden` or `-H` flag when use the KCL CLI to run KCL files. e.g.:
2710+
2711+
main.k
2712+
```python
2713+
a = 1
2714+
_b = 2
2715+
```
2716+
2717+
The output maybe as follows with the command `kcl run main.k -H`
2718+
```yaml
2719+
a: 1
2720+
_b: 2
2721+
```

0 commit comments

Comments
 (0)