code: func NewRootCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {
  	setupVersionBuild()
  	rc := &cobra.Command{
  		Use:   "pdk",
  		Short: "pdk - Pilosa Dev Kit and Examples",
  		Long: `A collection of libraries and worked examples
  for getting data into and out of Pilosa.
  Complete documentation is available at http://pilosa.com/docs/pdk
  
  Version: ` + Version + `
  Build Time: ` + BuildTime + "\n",
  		PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
  			v := viper.New()
  			return setAllConfig(v, cmd.Flags(), "PDK")
  		},
  	}
  	for _, subcomFn := range subcommandFns {
  		rc.AddCommand(subcomFn(stdin, stdout, stderr))
  	}
  	rc.SetOutput(stderr)
  	return rc
  }
docs: // NewRootCommand reads the map of subcommandFns and creates a top level cobra
  // command with each of them as subcommands.