refactor names and minimize dependencies
This commit is contained in:
@@ -4,10 +4,7 @@ import (
|
||||
"context"
|
||||
"os"
|
||||
|
||||
"github.com/LazyBachelor/LazyPM/internal/service"
|
||||
"github.com/LazyBachelor/LazyPM/internal/utils"
|
||||
"github.com/LazyBachelor/LazyPM/pkg/task"
|
||||
taskui "github.com/LazyBachelor/LazyPM/pkg/task/ui"
|
||||
"github.com/charmbracelet/huh"
|
||||
)
|
||||
|
||||
@@ -35,22 +32,22 @@ Please write your code below this line!
|
||||
|
||||
type CodingTask struct {
|
||||
done bool
|
||||
app *service.App
|
||||
app *App
|
||||
}
|
||||
|
||||
func NewCodingTask(app *service.App) *CodingTask {
|
||||
func NewCodingTask(app *App) *CodingTask {
|
||||
return &CodingTask{app: app, done: false}
|
||||
}
|
||||
|
||||
func (t *CodingTask) Config() task.Config {
|
||||
func (t *CodingTask) Config() Config {
|
||||
return BaseConfig().WithStatisticsStoragePath("./.pm/coding-task-stats.json")
|
||||
}
|
||||
|
||||
func (t *CodingTask) Details() taskui.TaskDetails {
|
||||
func (t *CodingTask) Details() TaskDetails {
|
||||
return BaseDetails().WithTitle("Coding Task").WithDescription(codingDescription)
|
||||
}
|
||||
|
||||
func (t *CodingTask) Questions(interfaceType task.InterfaceType) (questions taskui.Questions) {
|
||||
func (t *CodingTask) Questions(interfaceType InterfaceType) (questions Questions) {
|
||||
return BaseQuestions(interfaceType).
|
||||
With(
|
||||
ReplQuestion(interfaceType,
|
||||
|
||||
Reference in New Issue
Block a user