mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
all: Use jww instead of fmt for printing
This is an attempt to unify method for printing.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
e1da7cb320
commit
120f6b0cf2
@@ -14,11 +14,11 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/hugo/hugolib"
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
@@ -63,7 +63,7 @@ var listDraftsCmd = &cobra.Command{
|
||||
|
||||
for _, p := range sites.Pages() {
|
||||
if p.IsDraft() {
|
||||
fmt.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
|
||||
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -98,7 +98,7 @@ posted in the future.`,
|
||||
|
||||
for _, p := range sites.Pages() {
|
||||
if p.IsFuture() {
|
||||
fmt.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
|
||||
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -133,7 +133,7 @@ expired.`,
|
||||
|
||||
for _, p := range sites.Pages() {
|
||||
if p.IsExpired() {
|
||||
fmt.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
|
||||
jww.FEEDBACK.Println(filepath.Join(p.File.Dir(), p.File.LogicalName()))
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user