mirror of
https://github.com/go-task/task.git
synced 2026-06-11 09:51:50 +00:00
feat: remove logger from taskfile package (#2082)
* refactor: remove logger from the taskfile node interface * refactor: functional options on taskfile.Reader * feat: use pass in debug/prompt functions to Reader rather than task Logger * chore: reader docstrings * fix: typo
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/go-task/task/v3/errors"
|
||||
"github.com/go-task/task/v3/internal/execext"
|
||||
"github.com/go-task/task/v3/internal/filepathext"
|
||||
"github.com/go-task/task/v3/internal/logger"
|
||||
)
|
||||
|
||||
// An HTTPNode is a node that reads a Taskfile from a remote location via HTTP.
|
||||
@@ -19,12 +18,10 @@ type HTTPNode struct {
|
||||
*BaseNode
|
||||
URL *url.URL // stores url pointing actual remote file. (e.g. with Taskfile.yml)
|
||||
entrypoint string // stores entrypoint url. used for building graph vertices.
|
||||
logger *logger.Logger
|
||||
timeout time.Duration
|
||||
}
|
||||
|
||||
func NewHTTPNode(
|
||||
l *logger.Logger,
|
||||
entrypoint string,
|
||||
dir string,
|
||||
insecure bool,
|
||||
@@ -45,7 +42,6 @@ func NewHTTPNode(
|
||||
URL: url,
|
||||
entrypoint: entrypoint,
|
||||
timeout: timeout,
|
||||
logger: l,
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -58,7 +54,7 @@ func (node *HTTPNode) Remote() bool {
|
||||
}
|
||||
|
||||
func (node *HTTPNode) Read(ctx context.Context) ([]byte, error) {
|
||||
url, err := RemoteExists(ctx, node.logger, node.URL, node.timeout)
|
||||
url, err := RemoteExists(ctx, node.URL, node.timeout)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user