Skip to content

Adds hidden parameter FAQ #509

New issue

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

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/user_docs/support/faq-kcl.md
Original file line number Diff line number Diff line change
Expand Up @@ -2703,3 +2703,19 @@ Key Differences:
- Immutability: KCL emphasizes immutability, which influences how mixins and protocols are used, making them more suitable for declarative configurations.

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.

## 70. How do we output fields with leading underscores?

We can use the `--show-hidden` or `-H` flag when use the KCL CLI to run KCL files. e.g.:

main.k
```python
a = 1
_b = 2
```

The output maybe as follows with the command `kcl run main.k -H`
```yaml
a: 1
_b: 2
```
16 changes: 16 additions & 0 deletions versioned_docs/version-0.11/user_docs/support/faq-kcl.md
Original file line number Diff line number Diff line change
Expand Up @@ -2703,3 +2703,19 @@ Key Differences:
- Immutability: KCL emphasizes immutability, which influences how mixins and protocols are used, making them more suitable for declarative configurations.

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.

## 70. How do we output fields with leading underscores?

We can use the `--show-hidden` or `-H` flag when use the KCL CLI to run KCL files. e.g.:

main.k
```python
a = 1
_b = 2
```

The output maybe as follows with the command `kcl run main.k -H`
```yaml
a: 1
_b: 2
```