diff --git a/pkg/engine/backend/backend.go b/pkg/engine/backend/backend.go index 357cc4af..ede90a70 100644 --- a/pkg/engine/backend/backend.go +++ b/pkg/engine/backend/backend.go @@ -54,8 +54,7 @@ func MergeConfig(config, override map[string]interface{}) map[string]interface{} return content } -// NewDefalutBackend return defalut backend. -// default backend is local filesystem +// NewDefaultBackend return default backend, default backend is local filesystem func NewDefaultBackend(dir string, fileName string) *Storage { return &Storage{ Type: "local", diff --git a/pkg/generator/kcl/type.go b/pkg/generator/kcl/type.go index 2a05222c..256b19e8 100644 --- a/pkg/generator/kcl/type.go +++ b/pkg/generator/kcl/type.go @@ -4,13 +4,13 @@ import ( kcl "kcl-lang.io/kcl-go" ) -// The result of a KCL compilation +// CompileResult is the result of a KCL compilation type CompileResult struct { Documents []kcl.KCLResult RawYAMLResult string } -// New a CompileResult by KCLResultList +// NewCompileResult news a CompileResult by KCLResultList func NewCompileResult(k *kcl.KCLResultList) *CompileResult { return &CompileResult{ Documents: k.Slice(), @@ -18,7 +18,7 @@ func NewCompileResult(k *kcl.KCLResultList) *CompileResult { } } -// New a CompileResult by map array +// NewCompileResultByMapList news a CompileResult by map array func NewCompileResultByMapList(mapList []map[string]interface{}) *CompileResult { documents := []kcl.KCLResult{} for _, mapItem := range mapList { diff --git a/pkg/projectstack/types.go b/pkg/projectstack/types.go index 511a3615..fcf18a46 100644 --- a/pkg/projectstack/types.go +++ b/pkg/projectstack/types.go @@ -74,7 +74,7 @@ func (p *Project) GetName() string { return p.Name } -// GetName returns the path of the project +// GetPath returns the path of the project func (p *Project) GetPath() string { return p.Path } @@ -137,7 +137,7 @@ func (s *Stack) GetName() string { return s.Name } -// GetName returns the path of the stack +// GetPath returns the path of the stack func (s *Stack) GetPath() string { return s.Path } diff --git a/pkg/util/kfile/file.go b/pkg/util/kfile/file.go index f4ecbf7a..b84a5acd 100644 --- a/pkg/util/kfile/file.go +++ b/pkg/util/kfile/file.go @@ -58,7 +58,7 @@ func FileExists(filename string) (bool, error) { return !info.IsDir(), nil } -// Get the kusion data directory of the current user +// KusionDataFolder gets the kusion data directory of the current user func KusionDataFolder() (string, error) { var kusionDataFolder string