Migration: project-root detection → go/workspace¶
The marker-file project-root detector — Detect, DetectFromCWD, Workspace,
Option/WithMaxDepth, DefaultMarkers, DefaultMaxDepth, and ErrNotFound — has
been extracted verbatim into the standalone module
gitlab.com/phpboyscout/go/workspace (v0.1.0).
The package never touched Props, config, or a logger — it walks an injected
afero.Fs and returns a value — so there is no adapter and no facade. The only
change is the import path.
Repoint the import¶
// before
import "gitlab.com/phpboyscout/go-tool-base/pkg/workspace"
// after
import "gitlab.com/phpboyscout/go/workspace"
The API is identical; nothing else changes:
Add the dependency:
go get gitlab.com/phpboyscout/go/[email protected]
Why it moved¶
workspace is a general-purpose utility with no framework weight — its whole
dependency graph is afero, cockroachdb/errors, and the standard library. Extracting
it lets any tool reuse it without depending on go-tool-base, and gives it its own
release cadence and docs at
workspace.go.phpboyscout.uk.