aboutsummaryrefslogtreecommitdiff
path: root/adopt.go
diff options
context:
space:
mode:
Diffstat (limited to 'adopt.go')
-rw-r--r--adopt.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/adopt.go b/adopt.go
index 0393d08..2689722 100644
--- a/adopt.go
+++ b/adopt.go
@@ -7,21 +7,21 @@ import (
"path/filepath"
)
-func adopt(args []string) error {
+func adopt(conf *Conf, args []string) error {
if len(args) < 1 {
return errors.New("must specify at least one file to adopt")
}
for _, name := range args {
- if err := adoptFile(name); err != nil {
+ if err := adoptFile(conf, name); err != nil {
return err
}
}
return nil
}
-func adoptFile(name string) error {
- fromPath := filepath.Join(dest, name)
- toPath := filepath.Join(base, "templates", name)
+func adoptFile(conf *Conf, name string) error {
+ fromPath := filepath.Join(conf.Dest, name)
+ toPath := filepath.Join(conf.Source, "templates", name)
if err := os.MkdirAll(filepath.Dir(toPath), 0700); err != nil {
return err
}