mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
commands: Do not use named return vals in Jekyll import
This commit is contained in:
parent
35b798247e
commit
283b866386
1 changed files with 8 additions and 4 deletions
|
@ -260,7 +260,7 @@ func createConfigFromJekyll(inpath string, kind string, jekyllConfig map[string]
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func copyFile(source string, dest string) (err error) {
|
func copyFile(source string, dest string) error {
|
||||||
sf, err := os.Open(source)
|
sf, err := os.Open(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -276,13 +276,17 @@ func copyFile(source string, dest string) (err error) {
|
||||||
si, err := os.Stat(source)
|
si, err := os.Stat(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
err = os.Chmod(dest, si.Mode())
|
err = os.Chmod(dest, si.Mode())
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func copyDir(source string, dest string) (err error) {
|
func copyDir(source string, dest string) error {
|
||||||
fi, err := os.Stat(source)
|
fi, err := os.Stat(source)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -314,7 +318,7 @@ func copyDir(source string, dest string) (err error) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func copyJekyllFilesAndFolders(jekyllRoot string, dest string) (err error) {
|
func copyJekyllFilesAndFolders(jekyllRoot string, dest string) error {
|
||||||
fi, err := os.Stat(jekyllRoot)
|
fi, err := os.Stat(jekyllRoot)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue