Skip to content

Commit

Permalink
fix: refactor the case code.
Browse files Browse the repository at this point in the history
  • Loading branch information
zong-zhe committed May 29, 2023
1 parent c41f5c3 commit 4564b7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,16 @@ k8s = "1.27.2" # The dependency 'k8s' with version '1.27.2'
```kcl
# 导入并使用外部依赖 `k8s` 包中的内容。
import k8s.api.core.v1 as k8core
nginx = k8core.Pod {
k8core.Pod {
metadata.name = "web-app"
spec.containers = [{
name = "main-container"
image = "nginx"
ports = [{containerPort = 80}]
}]
}
```

### 使用 `kpm` 编译 kcl 包
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,15 @@ And write the following into the `main.k` file.
# Import and use the contents of the external dependency 'k8s'.
import k8s.api.core.v1 as k8core
nginx = k8core.Pod {
k8core.Pod {
metadata.name = "web-app"
spec.containers = [{
name = "main-container"
image = "nginx"
ports = [{containerPort = 80}]
}]
}
```

### Use the `kpm` compile the kcl package
Expand Down
Binary file modified docs/gifs/kpm_run.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4564b7c

Please sign in to comment.