mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-25 10:12:37 +02:00
move helper
This commit is contained in:
parent
f38ffe5ac8
commit
262737a66d
@ -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))
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user