Skip to content

Instantly share code, notes, and snippets.

@weakpixel
Created March 31, 2022 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weakpixel/d442c82359b370b5419422bae27e4042 to your computer and use it in GitHub Desktop.
Save weakpixel/d442c82359b370b5419422bae27e4042 to your computer and use it in GitHub Desktop.
type Config struct {
Tasks []*Task `hcl:"task,block"`
}
type Task struct {
Name string `hcl:"name,label"`
Steps []*Step `hcl:"step,block"`
}
type Step struct {
Type string `hcl:"type,label"`
Name string `hcl:"name,label"`
Remain hcl.Body `hcl:",remain"`
}
type ExecStep struct {
Command string `hcl:"command"`
}
func (s *ExecStep) Run() error {
return nil
}
type MkdirStep struct {
Path string `hcl:"path"`
}
func (s *MkdirStep) Run() error {
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment