Skip to content

Commit

Permalink
Fix several typos
Browse files Browse the repository at this point in the history
Signed-off-by: Pavol Pitonak <[email protected]>
  • Loading branch information
ppitonak authored and tekton-robot committed Mar 4, 2020
1 parent 34237e2 commit 80a30cd
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/pipeline/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func createPipeline(s *cli.Stream, p cli.Params, path string) error {
}

func loadPipeline(p cli.Params, target string) (*v1alpha1.Pipeline, error) {
content, err := file.LoadFileContent(p, target, file.IsYamlFile(), fmt.Errorf("inavlid file format for %s: .yaml or .yml file extension and format required", target))
content, err := file.LoadFileContent(p, target, file.IsYamlFile(), fmt.Errorf("invalid file format for %s: .yaml or .yml file extension and format required", target))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/pipeline/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func Test_Pipeline_Create(t *testing.T) {
input: seeds[0],
inputStream: nil,
wantError: true,
want: "inavlid file format for ./testdata/pipeline.txt: .yaml or .yml file extension and format required",
want: "invalid file format for ./testdata/pipeline.txt: .yaml or .yml file extension and format required",
},
{
name: "Mismatched resource file",
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/pipelineresource/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ func createFrom(s *cli.Stream, p cli.Params, path string) error {
}

func loadResource(p cli.Params, target string) (*v1alpha1.PipelineResource, error) {
content, err := file.LoadFileContent(p, target, file.IsYamlFile(), fmt.Errorf("inavlid file format for %s: .yaml or .yml file extension and format required", target))
content, err := file.LoadFileContent(p, target, file.IsYamlFile(), fmt.Errorf("invalid file format for %s: .yaml or .yml file extension and format required", target))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/pipelineresource/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ func Test_Pipeline_Resource_Create(t *testing.T) {
input: seeds[0],
inputStream: nil,
wantError: true,
want: "inavlid file format for ./testdata/pipelineresource.txt: .yaml or .yml file extension and format required",
want: "invalid file format for ./testdata/pipelineresource.txt: .yaml or .yml file extension and format required",
},
{
name: "Mismatched resource file",
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/task/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func createTask(s *cli.Stream, p cli.Params, path string) error {
}

func loadTask(p cli.Params, target string) (*v1alpha1.Task, error) {
content, err := file.LoadFileContent(p, target, file.IsYamlFile(), fmt.Errorf("inavlid file format for %s: .yaml or .yml file extension and format required", target))
content, err := file.LoadFileContent(p, target, file.IsYamlFile(), fmt.Errorf("invalid file format for %s: .yaml or .yml file extension and format required", target))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/task/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func Test_Task_Create(t *testing.T) {
input: seeds[0],
inputStream: nil,
wantError: true,
want: "inavlid file format for ./testdata/task.txt: .yaml or .yml file extension and format required",
want: "invalid file format for ./testdata/task.txt: .yaml or .yml file extension and format required",
},
{
name: "Mismatched resource file",
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/task/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ like cat,foo,bar
}

func parseTask(taskLocation string, p cli.Params) (*v1alpha1.Task, error) {
b, err := file.LoadFileContent(p, taskLocation, file.IsYamlFile(), fmt.Errorf("inavlid file format for %s: .yaml or .yml file extension and format required", taskLocation))
b, err := file.LoadFileContent(p, taskLocation, file.IsYamlFile(), fmt.Errorf("invalid file format for %s: .yaml or .yml file extension and format required", taskLocation))
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestLoadLocalFile(t *testing.T) {
}

p := &test.Params{}
localContentLoad, err := LoadFileContent(p, localTarget, IsYamlFile(), fmt.Errorf("inavlid file format for %s: .yaml or .yml file extension and format required", localTarget))
localContentLoad, err := LoadFileContent(p, localTarget, IsYamlFile(), fmt.Errorf("invalid file format for %s: .yaml or .yml file extension and format required", localTarget))
if err != nil {
t.Errorf("Error from running localContentLoad")
}
Expand All @@ -60,6 +60,6 @@ func TestGetError(t *testing.T) {
p := &test.Params{}
target := "httpz://foo.com/task.yaml"

_, err := LoadFileContent(p, target, IsYamlFile(), fmt.Errorf("inavlid file format for %s: .yaml or .yml file extension and format required", target))
_, err := LoadFileContent(p, target, IsYamlFile(), fmt.Errorf("invalid file format for %s: .yaml or .yml file extension and format required", target))
assert.Error(t, err, `Get httpz://foo.com/task.yaml: unsupported protocol scheme "httpz"`)
}

0 comments on commit 80a30cd

Please sign in to comment.