1
0
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:
Andrey Nering 2017-03-05 15:59:30 -03:00
parent fa850d1440
commit 7db3db48b0

View File

@ -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
}