mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-08 23:40:40 +02:00
Adding support for logging & verbose logging. Consolidation of error handling. Integration of jWalterWeatherman library. Fixed #137
This commit is contained in:
@@ -2,9 +2,10 @@ package hugolib
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
)
|
||||
|
||||
var summaryLength = 70
|
||||
@@ -62,7 +63,7 @@ func getRstContent(content []byte) string {
|
||||
var out bytes.Buffer
|
||||
cmd.Stdout = &out
|
||||
if err := cmd.Run(); err != nil {
|
||||
fmt.Println(err)
|
||||
jww.ERROR.Println(err)
|
||||
}
|
||||
|
||||
rstLines := strings.Split(out.String(), "\n")
|
||||
|
Reference in New Issue
Block a user