github.com/gobuffalo/buffalo-cli/v2@v2.0.0-alpha.15.0.20200919213536-a7350c8e6799/cli/internal/plugins/grifts/setup/setup.go (about)

     1  package setup
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/gobuffalo/buffalo-cli/v2/cli/internal/plugins/pop/setup"
     7  	"github.com/gobuffalo/plugins"
     8  	"github.com/markbates/grift/cli"
     9  )
    10  
    11  var _ plugins.Plugin = &Setup{}
    12  var _ setup.DBSeeder = &Setup{}
    13  
    14  type Setup struct {
    15  }
    16  
    17  func (s *Setup) PluginName() string {
    18  	return "grifts/setup"
    19  }
    20  
    21  func (s *Setup) SeedDB(ctx context.Context, root string, app []string) error {
    22  	return cli.Run(ctx, []string{"db:seed"})
    23  }