frostfs-node/cmd/neofs-cli/internal/common/verbose.go
Evgenii Stratonikov 71d823f192 [#1381] neofs-cli: Move JSON and verbose printing to a common package
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-05-25 09:46:41 +03:00

15 lines
339 B
Go

package common
import (
"fmt"
"github.com/nspcc-dev/neofs-node/cmd/neofs-cli/internal/commonflags"
"github.com/spf13/viper"
)
// PrintVerbose prints to the stdout if the commonflags.Verbose flag is on.
func PrintVerbose(format string, a ...interface{}) {
if viper.GetBool(commonflags.Verbose) {
fmt.Printf(format+"\n", a...)
}
}