File tree Expand file tree Collapse file tree 4 files changed +8
-16
lines changed
i18n/zh-CN/docusaurus-plugin-content-docs
version-0.10/reference/plugin
versioned_docs/version-0.10/reference/plugin Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
2424import (
2525 " fmt"
2626
27- " kcl-lang.io/kcl-go/pkg/kcl"
28- " kcl-lang.io/kcl-go/pkg/native" // Import the native API
27+ " kcl-lang.io/kcl-go/pkg/kcl" // Import the native API
2928 _ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
3029)
3130
3231func main () {
33- // Note we use `native.MustRun` here instead of `kcl.MustRun`, because it needs the cgo feature.
34- yaml := native.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
32+ yaml := kcl.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
3533 fmt.Println (yaml)
3634}
3735
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
2424import (
2525 " fmt"
2626
27- " kcl-lang.io/kcl-go/pkg/kcl"
28- " kcl-lang.io/kcl-go/pkg/native" // Import the native API
27+ " kcl-lang.io/kcl-go/pkg/kcl" // Import the native API
2928 _ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
3029)
3130
3231func main () {
33- // Note we use `native.MustRun` here instead of `kcl.MustRun`, because it needs the cgo feature.
34- yaml := native.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
32+ yaml := kcl.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
3533 fmt.Println (yaml)
3634}
3735
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
2424import (
2525 " fmt"
2626
27- " kcl-lang.io/kcl-go/pkg/kcl"
28- " kcl-lang.io/kcl-go/pkg/native" // Import the native API
27+ " kcl-lang.io/kcl-go/pkg/kcl" // Import the native API
2928 _ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
3029)
3130
3231func main () {
33- // Note we use `native.MustRun` here instead of `kcl.MustRun`, because it needs the cgo feature.
34- yaml := native.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
32+ yaml := kcl.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
3533 fmt.Println (yaml)
3634}
3735
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
2424import (
2525 " fmt"
2626
27- " kcl-lang.io/kcl-go/pkg/kcl"
28- " kcl-lang.io/kcl-go/pkg/native" // Import the native API
27+ " kcl-lang.io/kcl-go/pkg/kcl" // Import the native API
2928 _ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
3029)
3130
3231func main () {
33- // Note we use `native.MustRun` here instead of `kcl.MustRun`, because it needs the cgo feature.
34- yaml := native.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
32+ yaml := kcl.MustRun (" main.k" , kcl.WithCode (code)).GetRawYamlResult ()
3533 fmt.Println (yaml)
3634}
3735
You can’t perform that action at this time.
0 commit comments