Skip to content

Commit

Permalink
Breaking: Fix typo Project.EvaluatorSettings field (#52)
Browse files Browse the repository at this point in the history
The name of the variable 'EvaluatorSetings' was corrected to 'EvaluatorSettings'. To ensure overall correctness and readability, changes were made in project.go, project_test.go, and evaluator_options.go files.
  • Loading branch information
kasugamirai authored Apr 19, 2024
1 parent 431b70a commit aa6ea5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkl/evaluator_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ var WithFs = func(fs fs.FS, scheme string) func(opts *EvaluatorOptions) {
// ProjectEvaluatorSettings.
var WithProjectEvaluatorSettings = func(project *Project) func(opts *EvaluatorOptions) {
return func(opts *EvaluatorOptions) {
evaluatorSettings := project.EvaluatorSetings
evaluatorSettings := project.EvaluatorSettings
if evaluatorSettings == nil {
return
}
Expand Down
8 changes: 4 additions & 4 deletions pkl/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ func init() {

// Project is the go representation of pkl.Project.
type Project struct {
ProjectFileUri string `pkl:"projectFileUri"`
Package *ProjectPackage `pkl:"package"`
EvaluatorSetings *ProjectEvaluatorSettings `pkl:"evaluatorSettings"`
Tests []string `pkl:"tests"`
ProjectFileUri string `pkl:"projectFileUri"`
Package *ProjectPackage `pkl:"package"`
EvaluatorSettings *ProjectEvaluatorSettings `pkl:"evaluatorSettings"`
Tests []string `pkl:"tests"`

// internal field; use Project.Dependencies instead.
// values are either *Project or *ProjectRemoteDependency
Expand Down
2 changes: 1 addition & 1 deletion pkl/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestLoadProject(t *testing.T) {
AllowedModules: []string{"foo:", "bar:"},
AllowedResources: []string{"baz:", "biz:"},
}
assert.Equal(t, expectedSettings, project.EvaluatorSetings)
assert.Equal(t, expectedSettings, project.EvaluatorSettings)
})

t.Run("package", func(t *testing.T) {
Expand Down

0 comments on commit aa6ea5d

Please sign in to comment.