diff --git a/config.go b/config.go index acd7386..483ae08 100644 --- a/config.go +++ b/config.go @@ -25,7 +25,8 @@ package main import "fmt" type config struct { - Tasks map[string]task + Tasks map[string]taskDef + Macros map[string]macroDef tasksHandled map[string]bool } diff --git a/macro.go b/macro.go index 42828ff..b27e441 100644 --- a/macro.go +++ b/macro.go @@ -21,12 +21,14 @@ import ( "strings" ) -type macro struct { +type macro []string + +type macroDef struct { Prefix []string Suffix []string } -func (m macro) process(dir string, params []string, flags int) error { +func (m macroDef) process(dir string, params []string, flags int) error { var args []string args = appendExpEnv(args, m.Prefix) args = appendExpEnv(args, params)