Documentation
¶
Index ¶
- func LoadRoot(ctx context.Context, path string) (string, bool, error)
- func PrimaryRoot(ctx context.Context, compute func() string) string
- func StoreRoot(ctx context.Context, path, modulePath string) error
- func WithPrimaryRootCache(ctx context.Context) context.Context
- func WithRootCache(ctx context.Context) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrimaryRoot ¶ added in v0.340.0
PrimaryRoot returns the primary module root for ctx, computing it via compute() on the first call and reusing that result (even "not found", i.e. computed == "") for every later call, regardless of what compute would return this time. If ctx has no primary root cache (WithPrimaryRootCache was never called), compute() runs every time.
func WithPrimaryRootCache ¶ added in v0.340.0
WithPrimaryRootCache adds an empty, not-yet-resolved primary module root to the context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.