[#144] Support well-known application attributes for container in CLI

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-03 16:44:50 +03:00 committed by Alex Vanin
parent 62bd22a379
commit 83926647d7
2 changed files with 48 additions and 6 deletions

View file

@ -6,6 +6,8 @@ import (
"errors"
"fmt"
"io/ioutil"
"strconv"
"time"
"github.com/nspcc-dev/neofs-api-go/pkg"
"github.com/nspcc-dev/neofs-api-go/pkg/token"
@ -178,3 +180,14 @@ func prettyPrintJSON(cmd *cobra.Command, data []byte) {
cmd.Println(buf)
}
func prettyPrintUnixTime(s string) string {
unixTime, err := strconv.ParseInt(s, 10, 64)
if err != nil {
return "malformed"
}
timestamp := time.Unix(unixTime, 0)
return timestamp.String()
}