Created
March 31, 2022 17:40
-
-
Save weakpixel/d442c82359b370b5419422bae27e4042 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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