From 4d4e61ace11d5f56dfa4fb82c6443f9a387df4be Mon Sep 17 00:00:00 2001 From: zongz Date: Tue, 30 Jan 2024 15:29:04 +0800 Subject: [PATCH] fix: fix typo '{k8s:KCL_MOD}' -> '${k8s:KCL_MOD}' Signed-off-by: zongz --- docs/kcl_mod-zh.md | 4 ++-- docs/kcl_mod.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/kcl_mod-zh.md b/docs/kcl_mod-zh.md index 34aeaecd..f16191a2 100644 --- a/docs/kcl_mod-zh.md +++ b/docs/kcl_mod-zh.md @@ -121,11 +121,11 @@ entries = [ entries = [ "entry1.k", "subdir/entry2.k", - "{k8s:KCL_MOD}/core/api/v1/deployment.k" + "${k8s:KCL_MOD}/core/api/v1/deployment.k" ] ``` -`mod relative paths` 必须包含前缀 `{k8s:KCL_MOD}`,其中 `k8s` 是包名,`{k8s:KCL_MOD}` 表示包 k8s 的包根路径。因此,如果 `k8s` 的包根路径是 `/.kcl/kpm/k8s`,则上面的 `entries` 将把 `/usr/my_pkg/entry1.k`、`/usr/my_pkg/subdir/entry2.k` 和 `/.kcl/kpm/k8s/core/api/v1/deployment.k` 作为 `kcl` 编译器的入口点。 +`mod relative paths` 必须包含前缀 `${k8s:KCL_MOD}`,其中 `k8s` 是包名,`${k8s:KCL_MOD}` 表示包 k8s 的包根路径。因此,如果 `k8s` 的包根路径是 `/.kcl/kpm/k8s`,则上面的 `entries` 将把 `/usr/my_pkg/entry1.k`、`/usr/my_pkg/subdir/entry2.k` 和 `/.kcl/kpm/k8s/core/api/v1/deployment.k` 作为 `kcl` 编译器的入口点。 ### 注意 你可以使用 `normal path` 指定当前包路径中的编译入口点,使用 `mod relative path` 指定三方包中的入口点。 diff --git a/docs/kcl_mod.md b/docs/kcl_mod.md index f5dc0431..d67c5f2e 100644 --- a/docs/kcl_mod.md +++ b/docs/kcl_mod.md @@ -87,11 +87,11 @@ entries = [ entries = [ "entry1.k", "subdir/entry2.k", - "{k8s:KCL_MOD}/core/api/v1/deployment.k" + "${k8s:KCL_MOD}/core/api/v1/deployment.k" ] ``` -The `mod relative paths` must contains the preffix `{k8s:KCL_MOD}`, `k8s` is the package name, `{k8s:KCL_MOD}` means the package root path of the package `k8s`. Therefore, if the package root path of `k8s` is `/.kcl/kpm/k8s`, the `entries` show above will take `/usr/my_pkg/entry1.k`, `/usr/my_pkg/subdir/entry2.k` and `/.kcl/kpm/k8s/core/api/v1/deployment.k` as the entry point of the kcl compiler. +The `mod relative paths` must contains the preffix `${k8s:KCL_MOD}`, `k8s` is the package name, `${k8s:KCL_MOD}` means the package root path of the package `k8s`. Therefore, if the package root path of `k8s` is `/.kcl/kpm/k8s`, the `entries` show above will take `/usr/my_pkg/entry1.k`, `/usr/my_pkg/subdir/entry2.k` and `/.kcl/kpm/k8s/core/api/v1/deployment.k` as the entry point of the kcl compiler. ### Note You can use `normal path` to specify the compilation entry point in the current package path, and use `mod relative path` to specify the entry point in a third-party package.