move helper

This commit is contained in:
Celogeek 2021-12-14 13:46:45 +01:00
parent f38ffe5ac8
commit 262737a66d
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A
2 changed files with 3 additions and 3 deletions

View File

@ -1,11 +1,11 @@
package main
package piwigo
import (
"encoding/json"
"fmt"
)
func dumpResponse(v interface{}) (err error) {
func DumpResponse(v interface{}) (err error) {
b, err := json.MarshalIndent(v, "", " ")
if err == nil {
fmt.Println(string(b))

View File

@ -60,7 +60,7 @@ func (c *StatusCommand) Execute(args []string) error {
var resp map[string]interface{}
Piwigo.Post("pwg.session.getStatus", &url.Values{}, &resp)
dumpResponse(resp)
piwigo.DumpResponse(resp)
return nil
}