add a interface descripton to each task
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type Tasker interface {
|
||||
Config() Config
|
||||
Details() TaskDetails
|
||||
Details(InterfaceType) TaskDetails
|
||||
Setup(context.Context) error
|
||||
Questions(InterfaceType) Questions
|
||||
Validate(context.Context) ValidationFeedback
|
||||
@@ -32,10 +32,12 @@ type ValidatedInterface interface {
|
||||
}
|
||||
|
||||
type TaskDetails struct {
|
||||
Title string
|
||||
Description string
|
||||
TimeToComplete string
|
||||
Difficulty string
|
||||
Title string
|
||||
Description string
|
||||
TimeToComplete string
|
||||
Difficulty string
|
||||
InterfaceType InterfaceType
|
||||
InterfaceDescription string
|
||||
}
|
||||
|
||||
func (td TaskDetails) WithTitle(title string) TaskDetails {
|
||||
@@ -58,6 +60,16 @@ func (td TaskDetails) WithDifficulty(difficulty string) TaskDetails {
|
||||
return td
|
||||
}
|
||||
|
||||
func (td TaskDetails) WithInterfaceType(interfaceType InterfaceType) TaskDetails {
|
||||
td.InterfaceType = interfaceType
|
||||
return td
|
||||
}
|
||||
|
||||
func (td TaskDetails) WithInterfaceDescription(desc string) TaskDetails {
|
||||
td.InterfaceDescription = desc
|
||||
return td
|
||||
}
|
||||
|
||||
type Questions []*huh.Group
|
||||
|
||||
func (q Questions) With(group *huh.Group) Questions {
|
||||
|
||||
Reference in New Issue
Block a user