Skip to content

Commit

Permalink
Add create timestamp output for show alias (#219)
Browse files Browse the repository at this point in the history
/kind improvement

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Nov 30, 2023
1 parent d0ebeb0 commit 7c2b8ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion states/etcd/show/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/milvus-io/birdwatcher/models"
"github.com/milvus-io/birdwatcher/states/etcd/common"
etcdversion "github.com/milvus-io/birdwatcher/states/etcd/version"
"github.com/milvus-io/birdwatcher/utils"
"github.com/samber/lo"
)

Expand Down Expand Up @@ -53,5 +54,6 @@ func (rs *Aliases) PrintAs(format framework.Format) string {
}

func (rs *Aliases) PrintAlias(sb *strings.Builder, a *models.Alias) {
fmt.Printf("Collection ID: %d\tAlias Name: %s\tState: %s\n", a.CollectionID, a.Name, a.State.String())
t, _ := utils.ParseTS(a.CreateTS)
fmt.Printf("Collection ID: %d\tAlias Name: %s\tState: %s\tCreateTimestamp: %v\n", a.CollectionID, a.Name, a.State.String(), t)
}

0 comments on commit 7c2b8ec

Please sign in to comment.