diff options
Diffstat (limited to 'apply.go')
-rw-r--r-- | apply.go | 25 |
1 files changed, 1 insertions, 24 deletions
@@ -11,7 +11,7 @@ func apply(conf *Conf, args []string) error { if len(args) != 0 { return applyFiles(conf, args) } - names, err := getFileNames(conf) + names, err := conf.FileNames() if err != nil { return err } @@ -56,26 +56,3 @@ func applyFile(conf *Conf, name string) error { } return nil } - -func getFileNames(c *Conf) ([]string, error) { - var names []string - dir := filepath.Join(c.Source, "templates") - err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() { - return nil - } - name, err := filepath.Rel(dir, path) - if err != nil { - return err - } - names = append(names, name) - return nil - }) - if err != nil { - return nil, err - } - return names, nil -} |