mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-25 02:02:37 +02:00
21 lines
242 B
Go
21 lines
242 B
Go
/*
|
|
Debug tools
|
|
|
|
debug.Dump(myStruct)
|
|
*/
|
|
package debug
|
|
|
|
import (
|
|
"encoding/json"
|
|
"os"
|
|
)
|
|
|
|
/*
|
|
Dump an interface to the stdout
|
|
*/
|
|
func Dump(v interface{}) error {
|
|
d := json.NewEncoder(os.Stdout)
|
|
d.SetIndent("", " ")
|
|
return d.Encode(v)
|
|
}
|