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
24
24
import (
25
25
" fmt"
26
26
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
29
28
_ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
30
29
)
31
30
32
31
func 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 ()
35
33
fmt.Println (yaml)
36
34
}
37
35
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
24
24
import (
25
25
" fmt"
26
26
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
29
28
_ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
30
29
)
31
30
32
31
func 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 ()
35
33
fmt.Println (yaml)
36
34
}
37
35
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
24
24
import (
25
25
" fmt"
26
26
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
29
28
_ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
30
29
)
31
30
32
31
func 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 ()
35
33
fmt.Println (yaml)
36
34
}
37
35
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ package main
24
24
import (
25
25
" fmt"
26
26
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
29
28
_ " kcl-lang.io/kcl-go/pkg/plugin/hello_plugin" // Import the hello plugin
30
29
)
31
30
32
31
func 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 ()
35
33
fmt.Println (yaml)
36
34
}
37
35
You can’t perform that action at this time.
0 commit comments