use int format

This commit is contained in:
Celogeek 2021-12-31 16:25:55 +01:00
parent b30ee9c7b8
commit 28e99a59d2
Signed by: celogeek
GPG Key ID: E6B7BDCFC446233A

View File

@ -12,7 +12,7 @@ import (
) )
type ImageDetailsCommand struct { type ImageDetailsCommand struct {
Id string `short:"i" long:"id" description:"ID of the images" required:"true"` Id int `short:"i" long:"id" description:"ID of the images" required:"true"`
} }
func (c *ImageDetailsCommand) Execute(args []string) error { func (c *ImageDetailsCommand) Execute(args []string) error {
@ -28,7 +28,7 @@ func (c *ImageDetailsCommand) Execute(args []string) error {
var resp piwigotools.ImageDetails var resp piwigotools.ImageDetails
if err := p.Post("pwg.images.getInfo", &url.Values{ if err := p.Post("pwg.images.getInfo", &url.Values{
"image_id": []string{c.Id}, "image_id": []string{fmt.Sprint(c.Id)},
}, &resp); err != nil { }, &resp); err != nil {
return err return err
} }