Documentation ¶
Index ¶
- Constants
- type Compiler
- func (compiler *Compiler) AddDepPath(depName string, depPath string) *Compiler
- func (compiler *Compiler) AddKFile(kFilePath string) *Compiler
- func (compiler *Compiler) AddKclOption(opt kcl.Option) *Compiler
- func (compiler *Compiler) Run() (*kcl.KCLResultList, error)
- func (compiler *Compiler) SetKclCliArgs(kclCliArgs string) *Compiler
- type Flag
Constants ¶
View Source
const EXTERNAL_PKGS_ARG_PATTERN = "%s=%s"
The pattern of the external package argument.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler is a wrapper of kcl compiler.
func DefaultCompiler ¶
func DefaultCompiler() *Compiler
DefaultCompiler will create a default compiler.
func (*Compiler) AddDepPath ¶
AddDep will add a file path to the dependency list.
func (*Compiler) AddKclOption ¶
AddKclOption will add a kcl option to the compiler.
func (*Compiler) Run ¶
func (compiler *Compiler) Run() (*kcl.KCLResultList, error)
Call KCL Compiler and return the result.
func (*Compiler) SetKclCliArgs ¶
SetKclCliArgs will set the kcl cli arguments.
type Flag ¶
type Flag struct { ExternalPkg []string `arg:"-E,--external,separate"` Options []string `arg:"-D,--argument,separate"` Overrides []string `arg:"-O,--overrides,separate"` DisableNone bool `arg:"-n,--disable-none" default:"false"` SortKeys bool `arg:"-k,--sort-keys" default:"false"` Settings string `arg:"-Y,--settings" default:""` }
func (*Flag) IntoKclOptions ¶
IntoKclOptions converts the flag into kcl options.
Click to show internal directories.
Click to hide internal directories.