Skip to content

Commit 7e3b2a3

Browse files
author
Serdar Ormanlı
committed
#21 added check for modules with no available versions
Signed-off-by: Serdar Ormanlı <s.ormanli@thebeat.co>
1 parent 91b5946 commit 7e3b2a3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

internal/cmd/check/check.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,18 @@ func (o *Options) Execute(checker Checker) {
5656
var data [][]string
5757

5858
for name, result := range checkResults {
59-
data = append(data, []string{
59+
r := []string{
6060
name,
6161
result.LocalVersion.Original(),
62-
result.LatestVersion.Original(),
63-
})
62+
}
63+
64+
if result.Error != nil {
65+
r = append(r, fmt.Sprintf("failed because of: %s", result.Error.Error()))
66+
} else {
67+
r = append(r, result.LatestVersion.Original())
68+
}
69+
70+
data = append(data, r)
6471
}
6572

6673
table := tablewriter.NewWriter(os.Stdout)

0 commit comments

Comments
 (0)