plush: github.com/gobuffalo/plush/plush/cmd Index | Files

package cmd

import "github.com/gobuffalo/plush/plush/cmd"

Index

Package Files

root.go

Variables

var RootCmd = &cobra.Command{
    Use:   "plush",
    Short: "A brief description of your application",
    RunE: func(cmd *cobra.Command, args []string) error {
        if len(args) == 0 {
            return errors.New("you must pass in at least 1 plush file")
        }

        for _, a := range args {
            b, err := ioutil.ReadFile(a)
            if err != nil {
                return err
            }
            err = plush.RunScript(string(b), plush.NewContext())
            if err != nil {
                return err
            }

        }
        return nil
    },
}

RootCmd represents the base command when called without any subcommands

func Execute Uses

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Package cmd imports 6 packages (graph) and is imported by 1 packages. Updated 2019-05-13. Refresh now. Tools for package owners.