package main

import (
	"github.com/pachyderm/pachyderm/src/cmd/pachctl/cmd"
	"github.com/spf13/cobra/doc"
	"go.pedge.io/env"
)

type appEnv struct {
	OutputDir string `env:"OUTPUT_DIR,default=./doc/pachctl"`
}

func main() {
	env.Main(do, &appEnv{})
}

func do(appEnvObj interface{}) error {
	appEnv := appEnvObj.(*appEnv)
	// passing empty addresses for pfsd and ppsd, that's fine because we're not
	// going to execute the command but print docs with it
	rootCmd, err := cmd.PachctlCmd("", "")
	if err != nil {
		return err
	}
	doc.GenMarkdownTree(rootCmd, appEnv.OutputDir)
}

package main

import (
	"github.com/pachyderm/pachyderm/src/cmd/pachctl/cmd"
	"github.com/spf13/cobra/doc"
	"go.pedge.io/env"
)

type appEnv struct {
	OutputDir string `env:"OUTPUT_DIR,default=./doc/pachctl"`
}

func main() {
	env.Main(do, &appEnv{})
}

func do(appEnvObj interface{}) error {
	appEnv := appEnvObj.(*appEnv)
	// passing empty addresses for pfsd and ppsd, that's fine because we're not
	// going to execute the command but print docs with it
	rootCmd, err := cmd.PachctlCmd("", "")
	if err != nil {
		return err
	}
	doc.GenMarkdownTree(rootCmd, appEnv.OutputDir)
	return nil
}

Return nil so it compiles.
Return nil so it compiles.
