mirror of
https://github.com/go-task/task.git
synced 2025-02-09 13:47:06 +02:00
Minimal refactoring od isTaskUpToDate()
This commit is contained in:
parent
fa850d1440
commit
7db3db48b0
4
task.go
4
task.go
@ -94,7 +94,7 @@ func RunTask(name string) error {
|
||||
}
|
||||
}
|
||||
|
||||
if !Force && isTaskUpToDate(t) {
|
||||
if !Force && t.isUpToDate() {
|
||||
log.Printf(`task: Task "%s" is up to date`, name)
|
||||
return nil
|
||||
}
|
||||
@ -107,7 +107,7 @@ func RunTask(name string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func isTaskUpToDate(t *Task) bool {
|
||||
func (t *Task) isUpToDate() bool {
|
||||
if len(t.Sources) == 0 || len(t.Generates) == 0 {
|
||||
return false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user