mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
all: Use jww instead of fmt for printing
This is an attempt to unify method for printing.
This commit is contained in:
parent
e1da7cb320
commit
120f6b0cf2
8 changed files with 32 additions and 33 deletions
|
@ -14,10 +14,10 @@
|
|||
package commands
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
jww "github.com/spf13/jwalterweatherman"
|
||||
)
|
||||
|
||||
var envCmd = &cobra.Command{
|
||||
|
@ -26,9 +26,9 @@ var envCmd = &cobra.Command{
|
|||
Long: `Print Hugo version and environment info. This is useful in Hugo bug reports.`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
printHugoVersion()
|
||||
fmt.Printf("GOOS=%q\n", runtime.GOOS)
|
||||
fmt.Printf("GOARCH=%q\n", runtime.GOARCH)
|
||||
fmt.Printf("GOVERSION=%q\n", runtime.Version())
|
||||
jww.FEEDBACK.Printf("GOOS=%q\n", runtime.GOOS)
|
||||
jww.FEEDBACK.Printf("GOARCH=%q\n", runtime.GOARCH)
|
||||
jww.FEEDBACK.Printf("GOVERSION=%q\n", runtime.Version())
|
||||
|
||||
return nil
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue