aboutsummaryrefslogtreecommitdiffstats
path: root/skate/cmd
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-06-01 20:36:14 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-06-01 20:36:14 +0200
commit3c100d60220810596c75abfb6257f2f675bc8c95 (patch)
treef9a9c0cc6e203311c1eedc4be735c7199b2727fb /skate/cmd
parentdad3a75961e1bca6c17cb858e32e3806a37a48f7 (diff)
downloadrefcat-3c100d60220810596c75abfb6257f2f675bc8c95.tar.gz
refcat-3c100d60220810596c75abfb6257f2f675bc8c95.zip
resolve: bail out early if possible
Diffstat (limited to 'skate/cmd')
-rw-r--r--skate/cmd/skate-resolve-journal-name/main.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/skate/cmd/skate-resolve-journal-name/main.go b/skate/cmd/skate-resolve-journal-name/main.go
index 494b236..abbfa9b 100644
--- a/skate/cmd/skate-resolve-journal-name/main.go
+++ b/skate/cmd/skate-resolve-journal-name/main.go
@@ -58,6 +58,10 @@ func main() {
return nil, err
}
}
+ // XXX: we do not need to do any lookup w/o container name anyway.
+ if *keepResolvedOnly && release.ContainerName == "" {
+ return nil, nil
+ }
name := strings.ToLower(release.ContainerName)
results := ms.Lookup(name, -1)
if len(results) != 1 {