github.com/Azure/draft-classic@v0.16.0/cmd/draft/home.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"io"
     6  
     7  	"github.com/spf13/cobra"
     8  )
     9  
    10  const homeDesc = `
    11  Display the location of DRAFT_HOME. This is where any Draft configuration files live.
    12  `
    13  
    14  func newHomeCmd(out io.Writer) *cobra.Command {
    15  	cmd := &cobra.Command{
    16  		Use:   "home",
    17  		Short: "print the location of DRAFT_HOME",
    18  		Long:  homeDesc,
    19  		RunE: func(cmd *cobra.Command, args []string) error {
    20  			fmt.Fprintln(out, homePath())
    21  			return nil
    22  		},
    23  	}
    24  	return cmd
    25  }