refactor: slightly improved NewBaseNode API

This commit is contained in:
Pete Davison
2024-03-04 18:00:28 +00:00
parent 9a5fb38f48
commit b5df4e89c2
4 changed files with 6 additions and 10 deletions

View File

@@ -20,8 +20,7 @@ type HTTPNode struct {
}
func NewHTTPNode(l *logger.Logger, entrypoint, dir string, insecure bool, opts ...NodeOption) (*HTTPNode, error) {
base := NewBaseNode(opts...)
base.dir = dir
base := NewBaseNode(dir, opts...)
url, err := url.Parse(entrypoint)
if err != nil {
return nil, err