mirror of
https://github.com/go-task/task.git
synced 2026-02-25 04:33:43 +01:00
refactor: remove redundant comments
This commit is contained in:
@@ -247,7 +247,6 @@ func printTaskRequires(l *logger.Logger, t *ast.Task) {
|
||||
l.Outf(logger.Default, " vars:\n")
|
||||
|
||||
for _, v := range t.Requires.Vars {
|
||||
// If the variable has enum constraints, format accordingly
|
||||
if v.Enum != nil && len(v.Enum.Value) > 0 {
|
||||
l.Outf(logger.Yellow, " - %s:\n", v.Name)
|
||||
l.Outf(logger.Yellow, " enum:\n")
|
||||
@@ -255,7 +254,6 @@ func printTaskRequires(l *logger.Logger, t *ast.Task) {
|
||||
l.Outf(logger.Yellow, " - %s\n", enumValue)
|
||||
}
|
||||
} else {
|
||||
// Simple required variable
|
||||
l.Outf(logger.Yellow, " - %s\n", v.Name)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,6 @@ func (e *Executor) areTaskRequiredVarsAllowedValuesSet(t *ast.Task) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// getEnumValues returns the enum values from an Enum struct, or nil if the enum is nil.
|
||||
func getEnumValues(e *ast.Enum) []string {
|
||||
if e == nil {
|
||||
return nil
|
||||
|
||||
@@ -25,8 +25,8 @@ func (r *Requires) DeepCopy() *Requires {
|
||||
// Enum represents an enum constraint for a required variable.
|
||||
// It can either be a static list of values or a reference to another variable.
|
||||
type Enum struct {
|
||||
Ref string // Reference to a variable containing the allowed values
|
||||
Value []string // Static list of allowed values
|
||||
Ref string
|
||||
Value []string
|
||||
}
|
||||
|
||||
func (e *Enum) DeepCopy() *Enum {
|
||||
|
||||
Reference in New Issue
Block a user