func Execute() {
	if err := RootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(-1)
	}
}
Execute adds all child commands to the root command sets flags appropriately.
This is called by main.main(). It only needs to happen once to the rootCmd.
package main
import (
	"fmt"
	"io/ioutil"
	"os"
	"os/signal"
	"path/filepath"
	"strings"
	"github.com/slotix/dataflowkit/fetch"
	"github.com/slotix/dataflowkit/healthcheck"
	"github.com/spf13/cobra"
	"github.com/spf13/viper"
)
var (
	DFKFetch          string  
	fetchProxy        string  
	chrome            string
	chromeTrace       bool
	chromeScriptsPath string
	storageType     string
	ignoreCacheInfo bool
	diskvBaseDir    string
	cassandraHost string
	mongoHost     string
	excludeResources []string
	fetchTimeout     int
)
var RootCmd = &cobra.Command{
	Use:   "dataflowkit",
	Short: "Dataflow Kit html fetcher",
	Long:  `Dataflow Kit fetch service downloads html web pages and passes content to Dataflow Kit parse service.`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("Checking services ... ")
		services := []healthcheck.Checker{
			healthcheck.ChromeConn{
				Host: chrome,
			},
		}
		sType := strings.ToLower(storageType)
		if sType == "mongodb" {
			services = append(services, healthcheck.MongoConn{
				Host: mongoHost,
			})
		}
		status := healthcheck.CheckServices(services...)
		allAlive := true
		for k, v := range status {
			fmt.Printf("%s: %s\n", k, v)
			if v != "Ok" {
				allAlive = false
			}
		}
		if allAlive {
			fmt.Printf("Storage %s\n", storageType)
			fetchServer := viper.GetString("DFK_FETCH")
			serverCfg := fetch.Config{
				Host: fetchServer,  
				Version: Version,
			}
			htmlServer := fetch.Start(serverCfg)
			defer htmlServer.Stop()
			sigChan := make(chan os.Signal, 1)
			signal.Notify(sigChan, os.Interrupt)
			<-sigChan
			fmt.Println("main : shutting down")
		}
	},
}