mirror of
https://github.com/lancatlin/mdsh.git
synced 2026-11-05 19:30:12 +08:00
22 lines
386 B
Go
22 lines
386 B
Go
package main
|
|
|
|
import "encoding/json"
|
|
|
|
type TemplateMeta struct {
|
|
Output string `yaml:"output"`
|
|
Params map[string]ParamSpec `yaml:"params"`
|
|
}
|
|
|
|
func (meta TemplateMeta) String() string {
|
|
data, err := json.Marshal(meta)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return string(data)
|
|
}
|
|
|
|
type ParamSpec struct {
|
|
Required bool `yaml:"required"`
|
|
Default string `yaml:"default"`
|
|
}
|