summary refs log tree commit diff stats
path: root/cmd
diff options
context:
space:
mode:
authorAndinus <andinus@inventati.org>2020-03-15 13:30:18 +0530
committerAndinus <andinus@inventati.org>2020-03-15 13:30:18 +0530
commitc1e489fbd281698b262d3114b08f875b1ff3b966 (patch)
tree4de8ffb1f8be0ec24900b511cf7146aedc64e71a /cmd
parent944222f65a6c633e28638cba6ada5c7154aef3ed (diff)
downloadcetus-c1e489fbd281698b262d3114b08f875b1ff3b966.tar.gz
Handle if block within printDetails function
Diffstat (limited to 'cmd')
-rw-r--r--cmd/cetus-nasa/cetus-nasa.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/cetus-nasa/cetus-nasa.go b/cmd/cetus-nasa/cetus-nasa.go
index d462455..801a89f 100644
--- a/cmd/cetus-nasa/cetus-nasa.go
+++ b/cmd/cetus-nasa/cetus-nasa.go
@@ -69,9 +69,7 @@ func main() {
 		log.Fatal(err)
 	}
 
-	if !quiet {
-		printDetails(apodRes)
-	}
+	printDetails(apodRes)
 
 	// if fetchOnly is true then don't set background
 	if fetchOnly {
@@ -110,6 +108,9 @@ func parseFlags() {
 }
 
 func printDetails(apodRes nasa.APOD) {
+	if quiet {
+		return
+	}
 	fmt.Printf("Title: %s\n\n", apodRes.Title)
 	fmt.Printf("Copyright: %s\n", apodRes.Copyright)
 	fmt.Printf("Date: %s\n\n", apodRes.Date)