mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
refactor: enable gofmt linter and fix all issues
- also rewrite 'interface{}' as 'any'
This commit is contained in:
committed by
Andrey Nering
parent
a6d57496c2
commit
aab51c331f
@@ -14,7 +14,7 @@ type StatusCheckable interface {
|
||||
// SourcesCheckable defines any type that can check if the sources of a task are up-to-date.
|
||||
type SourcesCheckable interface {
|
||||
IsUpToDate(t *taskfile.Task) (bool, error)
|
||||
Value(t *taskfile.Task) (interface{}, error)
|
||||
Value(t *taskfile.Task) (any, error)
|
||||
OnError(t *taskfile.Task) error
|
||||
Kind() string
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
// Code generated by MockGen. DO NOT EDIT.
|
||||
// Source: checker.go
|
||||
// Source: internal/fingerprint/checker.go
|
||||
|
||||
// Package fingerprint is a generated GoMock package.
|
||||
package fingerprint
|
||||
@@ -117,10 +117,10 @@ func (mr *MockSourcesCheckableMockRecorder) OnError(t interface{}) *gomock.Call
|
||||
}
|
||||
|
||||
// Value mocks base method.
|
||||
func (m *MockSourcesCheckable) Value(t *taskfile.Task) (interface{}, error) {
|
||||
func (m *MockSourcesCheckable) Value(t *taskfile.Task) (any, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "Value", t)
|
||||
ret0, _ := ret[0].(interface{})
|
||||
ret0, _ := ret[0].(any)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ func (checker *ChecksumChecker) IsUpToDate(t *taskfile.Task) (bool, error) {
|
||||
return oldMd5 == newMd5, nil
|
||||
}
|
||||
|
||||
func (checker *ChecksumChecker) Value(t *taskfile.Task) (interface{}, error) {
|
||||
func (checker *ChecksumChecker) Value(t *taskfile.Task) (any, error) {
|
||||
return checker.checksum(t)
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@ func (NoneChecker) IsUpToDate(t *taskfile.Task) (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
func (NoneChecker) Value(t *taskfile.Task) (interface{}, error) {
|
||||
func (NoneChecker) Value(t *taskfile.Task) (any, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
|
@@ -89,7 +89,7 @@ func (checker *TimestampChecker) Kind() string {
|
||||
}
|
||||
|
||||
// Value implements the Checker Interface
|
||||
func (checker *TimestampChecker) Value(t *taskfile.Task) (interface{}, error) {
|
||||
func (checker *TimestampChecker) Value(t *taskfile.Task) (any, error) {
|
||||
sources, err := globs(t.Dir, t.Sources)
|
||||
if err != nil {
|
||||
return time.Now(), err
|
||||
|
Reference in New Issue
Block a user