mirror of
https://github.com/go-task/task.git
synced 2025-06-23 00:38:19 +02:00
feat: remote taskfile improvements (cache/expiry) (#2176)
* feat: cache as node, RemoteNode and cache-first approach * feat: cache expiry * feat: pass ctx into reader methods instead of timeout * docs: updated remote taskfiles experiment doc * feat: use cache if download fails
This commit is contained in:
@ -2,7 +2,6 @@ package taskfile
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
@ -30,7 +29,7 @@ func (node *StdinNode) Remote() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (node *StdinNode) Read(ctx context.Context) ([]byte, error) {
|
||||
func (node *StdinNode) Read() ([]byte, error) {
|
||||
var stdin []byte
|
||||
scanner := bufio.NewScanner(os.Stdin)
|
||||
for scanner.Scan() {
|
||||
@ -72,7 +71,3 @@ func (node *StdinNode) ResolveDir(dir string) (string, error) {
|
||||
|
||||
return filepathext.SmartJoin(node.Dir(), path), nil
|
||||
}
|
||||
|
||||
func (node *StdinNode) FilenameAndLastDir() (string, string) {
|
||||
return "", "__stdin__"
|
||||
}
|
||||
|
Reference in New Issue
Block a user