diff --git a/internal/taskfile/included_taskfile.go b/internal/taskfile/included_taskfile.go index 3b9c7008..21170e4d 100644 --- a/internal/taskfile/included_taskfile.go +++ b/internal/taskfile/included_taskfile.go @@ -3,21 +3,21 @@ package taskfile import "errors" var ( - // ErrCantUnmarshalIncludedTaskFile is returned for invalid var YAML. - ErrCantUnmarshalIncludedTaskFile = errors.New("task: can't unmarshal included value") + // ErrCantUnmarshalIncludedTaskfile is returned for invalid var YAML. + ErrCantUnmarshalIncludedTaskfile = errors.New("task: can't unmarshal included value") ) -// IncludedTaskFile represents information about included tasksfile -type IncludedTaskFile struct { +// IncludedTaskfile represents information about included tasksfile +type IncludedTaskfile struct { Taskfile string Dir string } -// IncludedTaskFiles represents information about included tasksfiles -type IncludedTaskFiles = map[string]IncludedTaskFile +// IncludedTaskfiles represents information about included tasksfiles +type IncludedTaskfiles = map[string]IncludedTaskfile // UnmarshalYAML implements yaml.Unmarshaler interface -func (it *IncludedTaskFile) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (it *IncludedTaskfile) UnmarshalYAML(unmarshal func(interface{}) error) error { var str string if err := unmarshal(&str); err == nil { it.Taskfile = str @@ -34,5 +34,5 @@ func (it *IncludedTaskFile) UnmarshalYAML(unmarshal func(interface{}) error) err return nil } - return ErrCantUnmarshalIncludedTaskFile + return ErrCantUnmarshalIncludedTaskfile } diff --git a/internal/taskfile/merge.go b/internal/taskfile/merge.go index 6a545df3..d350e4b9 100644 --- a/internal/taskfile/merge.go +++ b/internal/taskfile/merge.go @@ -22,7 +22,7 @@ func Merge(t1, t2 *Taskfile, namespaces ...string) error { } if t1.Includes == nil { - t1.Includes = make(IncludedTaskFiles) + t1.Includes = make(IncludedTaskfiles) } for k, v := range t2.Includes { t1.Includes[k] = v diff --git a/internal/taskfile/read/taskfile.go b/internal/taskfile/read/taskfile.go index d7ed4b9e..cd80ca8b 100644 --- a/internal/taskfile/read/taskfile.go +++ b/internal/taskfile/read/taskfile.go @@ -47,8 +47,8 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) { } includedTaskDirectory := filepath.Dir(path) - includedTaskFileName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path)) - path = filepath.Join(includedTaskDirectory, fmt.Sprintf("%s_%s.yml", includedTaskFileName, runtime.GOOS)) + includedTaskfileName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path)) + path = filepath.Join(includedTaskDirectory, fmt.Sprintf("%s_%s.yml", includedTaskfileName, runtime.GOOS)) if _, err = os.Stat(path); err == nil { osIncludedTaskfile, err := readTaskfile(path) if err != nil { diff --git a/internal/taskfile/taskfile.go b/internal/taskfile/taskfile.go index c0fc5a17..bcb7653c 100644 --- a/internal/taskfile/taskfile.go +++ b/internal/taskfile/taskfile.go @@ -6,7 +6,7 @@ type Taskfile struct { Expansions int Output string Method string - Includes IncludedTaskFiles + Includes IncludedTaskfiles Vars Vars Env Vars Tasks Tasks @@ -20,7 +20,7 @@ func (tf *Taskfile) UnmarshalYAML(unmarshal func(interface{}) error) error { Expansions int Output string Method string - Includes IncludedTaskFiles + Includes IncludedTaskfiles Vars Vars Env Vars Tasks Tasks