Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: normalize some annotations #430

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/engine/backend/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions pkg/generator/kcl/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ 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(),
RawYAMLResult: k.GetRawYamlResult(),
}
}

// 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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/projectstack/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/kfile/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down