Skip to content

Commit f1215e1

Browse files
authored
Merge pull request #354 from Peefy/refactor-kcl-pattern
docs: update kcl config pattern with the attribute operator
2 parents 3af3619 + 40c5a90 commit f1215e1

File tree

2 files changed

+6
-6
lines changed
  • docs/user_docs/getting-started
  • i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/getting-started

2 files changed

+6
-6
lines changed

docs/user_docs/getting-started/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ Although KCL is not a general language, it has corresponding application scenari
6666
The configuration of attributes in KCL usually meets the simple pattern:
6767

6868
$$
69-
k = (T) v
69+
k op (T) v
7070
$$
7171

72-
where $k$ is the attribute name, $v$ is the attributes value, and $T$ is the type annotation. Since KCL has the ability of the type inference, $T$ is usually omitted.
72+
where $k$ is the attribute name, $v$ is the attributes value, $op$ is the attribute operator and $T$ is the type annotation. Since KCL has the ability of the type inference, $T$ is usually omitted. `deploy = Deployment {}` is a simple example that satisfies the pattern.
7373

74-
This is an example of generating kubernetes manifests.
74+
This is an example of generating Kubernetes manifests.
7575

7676
```python
7777
apiVersion = "apps/v1"

i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/getting-started/intro.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ KCL 试图提供独立于运行时的可编程性,不在本地提供线程和
6666
KCL 配置通常遵循如下模式:
6767

6868
$$
69-
k = (T) v
69+
k op (T) v
7070
$$
7171

72-
其中,$k$ 是属性名称,$v$ 是属性值,$T$ 是类型注解。由于 KCL 具有类型推导的能力,因此 $T$ 通常可以省略。
72+
其中,$k$ 是属性名称,$v$ 是属性值,$op$ 是属性运算符,$T$ 是类型注解。由于 KCL 具有类型推导的能力,因此 $T$ 通常可以省略。比如 `deploy = Deployment {}` 就是一个符合该模式的简单示例
7373

74-
下面是一个用 KCL 生成 kubernetes 资源的例子
74+
下面是一个用 KCL 生成 Kubernetes 资源的例子
7575

7676
```python
7777
apiVersion = "apps/v1"

0 commit comments

Comments
 (0)