github.com/gobuffalo/buffalo-cli/v2@v2.0.0-alpha.15.0.20200919213536-a7350c8e6799/cli/internal/plugins/webpack/build/ifaces_test.go (about) 1 package build 2 3 import ( 4 "context" 5 "os/exec" 6 ) 7 8 var _ AssetBuilder = &bladeRunner{} 9 10 type bladeRunner struct { 11 cmd *exec.Cmd 12 err error 13 } 14 15 func (bladeRunner) PluginName() string { 16 return "blade" 17 } 18 19 func (b *bladeRunner) BuildAssets(ctx context.Context, root string, cmd *exec.Cmd) error { 20 b.cmd = cmd 21 return b.err 22 } 23 24 var _ Tooler = &tooler{} 25 26 type tooler struct { 27 root string 28 tool string 29 err error 30 } 31 32 func (tooler) PluginName() string { 33 return "tooler" 34 } 35 36 func (tool *tooler) AssetTool(ctx context.Context, root string) (string, error) { 37 tool.root = root 38 return tool.tool, tool.err 39 }