discover

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package discover finds the compose projects below a directory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Targets []Target
	// Warnings describes unreadable directories that were skipped.
	Warnings []string
}

Result holds the discovered targets and the directories that were skipped.

func Targets

func Targets(root string, maxDepth int) (Result, error)

Targets scans root and its subdirectories down to maxDepth for compose files. Hidden directories are ignored and each directory contributes at most one compose file, chosen by filename precedence.

type Target

type Target struct {
	// Dir is the project directory.
	Dir string
	// File is the canonical compose file in Dir.
	File string
	// Label is Dir relative to the scan root ("." for the root itself).
	Label string
	// ProjectName is the compose project name used for the target.
	ProjectName string
}

Target is one discovered compose project.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL