github.com/Ryooooooga/zouch@v0.3.9/pkg/commands/list.go (about)

     1  package commands
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  func (cmd *Command) List(files []string) error {
     8  	templateFiles, err := cmd.Templates.ListTemplates()
     9  	if err != nil {
    10  		return err
    11  	}
    12  
    13  	for _, tpl := range templateFiles {
    14  		fmt.Fprintf(cmd.Output, "%s\n", tpl)
    15  	}
    16  
    17  	return nil
    18  }