Skip to content

Commit

Permalink
chore: update example codes
Browse files Browse the repository at this point in the history
Signed-off-by: Peefy <[email protected]>
  • Loading branch information
Peefy committed Oct 24, 2024
1 parent ccc218b commit e12c04c
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 22 deletions.
4 changes: 2 additions & 2 deletions docs/user_docs/guides/package-management/3-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ You can then add a dependency to the current kcl package using the `kcl mod add`
As shown below, taking the example of adding a package dependency named `k8s`, the version of the package is `1.28`.

```shell
kcl mod add k8s:1.28
kcl mod add k8s:1.28.1
```

You can see that `kcl` adds the dependency you just added to kcl.mod.
Expand All @@ -51,7 +51,7 @@ edition = "0.0.1"
version = "0.0.1"

[dependencies]
k8s = "1.28" # The dependency 'k8s' with version '1.28'
k8s = "1.28.1" # The dependency 'k8s' with version '1.28.1'
```

### Write a kcl program that uses the content in `k8s`
Expand Down
2 changes: 1 addition & 1 deletion examples/kubernetes/from-kubernetes/kcl.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ edition = "v0.10.0"
version = "0.0.1"

[dependencies]
crd = { path = "./models" }
crd = { path = "./models" }
2 changes: 1 addition & 1 deletion examples/kubernetes/generate-manifests/my-module/kcl.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ edition = "0.0.1"
version = "0.0.1"

[dependencies]
k8s = "1.28"
k8s = "1.28.1"
8 changes: 2 additions & 6 deletions examples/kubernetes/generate-manifests/my-module/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
full_name = "k8s_1.28.1"
version = "1.28.1"
2 changes: 1 addition & 1 deletion examples/kubevela/kcl-play-svc/kcl.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ version = "0.0.1"

[dependencies]
oam = "0.1.0"
k8s = "1.28"
k8s = "1.28.1"
8 changes: 2 additions & 6 deletions examples/kubevela/kcl-play-svc/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
sum = "aTxPUVZyr9MdiB3YdiY/8pCh9sC55yURnZdGlJsKG6Q="
reg = "ghcr.io"
repo = "kcl-lang/k8s"
oci_tag = "1.28"
full_name = "k8s_1.28.1"
version = "1.28.1"
[dependencies.oam]
name = "oam"
full_name = "oam_0.1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/package-management/oci/my_package/kcl.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ edition = "0.0.1"
version = "0.0.1"

[dependencies]
k8s = "1.28"
k8s = "1.28.1"
4 changes: 2 additions & 2 deletions examples/package-management/oci/my_package/kcl.mod.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[dependencies]
[dependencies.k8s]
name = "k8s"
full_name = "k8s_1.28"
version = "1.28"
full_name = "k8s_1.28.1"
version = "1.28.1"
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ version = "0.0.1"
如下面的命令所示,为当前包添加一个版本号为 `1.28` 并且名为 `k8s` 的依赖包。

```shell
kcl mod add k8s:1.28
kcl mod add k8s:1.28.1
```

`kcl` 会为您将依赖添加到 kcl.mod 文件中.
Expand All @@ -51,7 +51,7 @@ edition = "0.0.1"
version = "0.0.1"

[dependencies]
k8s = "1.28" # The dependency 'k8s' with version '1.28'
k8s = "1.28.1" # The dependency 'k8s' with version '1.28.1'
```

## 编写一个程序使用包 `konfig` 中的内容
Expand Down

0 comments on commit e12c04c

Please sign in to comment.