Skip to content

Commit

Permalink
fix(featctl/cmd): fix featctl command list revision
Browse files Browse the repository at this point in the history
  • Loading branch information
jinghancc committed Nov 12, 2021
1 parent fbf998d commit a5e3040
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions featctl/cmd/list_revision.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ func printRevisionsInASCIITable(revisions []*typesv2.Revision) error {
}

func revisionHeader() []string {
return []string{"Revision", "GroupID", "DataTable", "Description", "CreateTime", "ModifyTime"}
return []string{"Revision", "RevisionID", "GroupName", "DataTable", "Description", "CreateTime", "ModifyTime"}
}

func revisionRecord(r *typesv2.Revision) []string {
return []string{strconv.Itoa(int(r.Revision)), serializeInt16(r.GroupID), r.DataTable, r.Description,
return []string{strconv.Itoa(int(r.Revision)), serializeInt32(r.ID), r.Group.Name, r.DataTable, r.Description,
r.CreateTime.Format(time.RFC3339), r.ModifyTime.Format(time.RFC3339)}
}
4 changes: 4 additions & 0 deletions featctl/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ func stringPtr(s string) *string {
func serializeInt16(i int16) string {
return strconv.FormatInt(int64(i), 10)
}

func serializeInt32(i int32) string {
return strconv.FormatInt(int64(i), 10)
}

0 comments on commit a5e3040

Please sign in to comment.