package main

import (
	"fmt"
	"os"

	"github.com/peteretelej/saf"
)

func main() {
	b, err := saf.GetBundles()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to get bundles: %v\n", err)
		os.Exit(1)
	}
	b.PrettyPrint()

}

package main

import (
	"fmt"

	"github.com/peteretelej/saf"
)

func main() {
	b, err := saf.GetBundles()
	if err != nil {
		fmt.Printf("Failed to get bundles: %v\n", err)
		return
	}
	b.PrettyPrint()

}

--- 
+++ 
@@ -2,6 +2,7 @@
 
 import (
 	"fmt"
+	"os"
 
 	"github.com/peteretelej/saf"
 )
@@ -9,8 +10,8 @@
 func main() {
 	b, err := saf.GetBundles()
 	if err != nil {
-		fmt.Printf("Failed to get bundles: %v\n", err)
-		return
+		fmt.Fprintf(os.Stderr, "Failed to get bundles: %v\n", err)
+		os.Exit(1)
 	}
 	b.PrettyPrint()
 
Add exit status to error exit
