Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

Commit 65bfebb

Browse files
authored
Print id when listing apps (#69)
* adding id for print of apps
1 parent 83cee0e commit 65bfebb

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎.circleci/config.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
steps:
88
- checkout
99
- run: go get -u github.com/golang/dep/cmd/dep
10-
- run: go get -u github.com/golang/lint/golint
10+
- run: go get -u golang.org/x/lint/golint
1111
- restore_cache:
1212
key: dependency-cache-{{ checksum "Gopkg.lock" }}
1313
- run:

‎printer/apps.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
func PrintApps(docList []*enigma.DocListEntry) {
1212

1313
docTable := tm.NewTable(0, 10, 3, ' ', 0)
14-
fmt.Fprintf(docTable, "Name\tLast-Reloaded\tReadOnly\tTitle\n")
14+
fmt.Fprintf(docTable, "Id\tName\tLast-Reloaded\tReadOnly\tTitle\n")
1515
for _, doc := range docList {
16-
fmt.Fprintf(docTable, "%s\t%s\t%t\t%s\n", doc.DocName, doc.LastReloadTime, doc.ReadOnly, doc.Title)
16+
fmt.Fprintf(docTable, "%s\t%s\t%s\t%t\t%s\n", doc.DocId, doc.DocName, doc.LastReloadTime, doc.ReadOnly, doc.Title)
1717
}
1818
fmt.Print(docTable)
1919
}

‎test/corectl_integration_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func TestCorectlContains(t *testing.T) {
143143
args []string
144144
contains []string
145145
}{
146-
{"list apps", []string{connectToEngine, "apps"}, []string{"Name", "Last-Reloaded", "ReadOnly", "Title", "project2.qvf", "project1.qvf"}},
146+
{"list apps", []string{connectToEngine, "apps"}, []string{"Id", "Name", "Last-Reloaded", "ReadOnly", "Title", "project2.qvf", "project1.qvf"}},
147147
{"err 1", []string{"--engine=localhost:9999", "fields"}, []string{"Please check the --engine parameter or your config file", "Error details: dial tcp"}},
148148
}
149149

0 commit comments

Comments
 (0)
⌂ 换网址