Skip to content

Commit 78e5e47

Browse files
authored
Merge pull request #509 from Darkhood148/hidden_param_faq
Adds hidden parameter FAQ
2 parents 13eedac + de81cf0 commit 78e5e47

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

docs/user_docs/support/faq-kcl.md

+16
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+
```

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

+16
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)