Discover Packages
github.com/GerardSmit/multirunner
internal
detect
package
Version:
v0.0.3
Opens a new window with list of versions in this module.
Published: Oct 1, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package detect scans a repository (a local checkout or, via the GitHub API, a
remote repo) and recommends which prebuilt runner image flavors its CI is
likely to need. It is a setup-time helper: routing at run time stays label
based, so the output is a ready-to-paste pools block plus the images to pull.
Render produces a human report: detected flavors, the images they map to, a
ready-to-paste pools block, and the runs-on label sets found in workflows.
type DirSource struct {
Root string
}
DirSource scans a local checkout rooted at Root.
Paths walks the directory tree, skipping dependency/output dirs, and returns
repo-relative slash-separated file paths.
ReadFile reads a repo-relative path from the checkout.
Flavor is a published runner image flavor (matches config.publishedFlavors).
const (
FlavorNativeBuild Flavor = "native-build"
FlavorNode Flavor = "node"
FlavorDotnet Flavor = "dotnet"
FlavorRust Flavor = "rust"
FlavorGo Flavor = "go"
)
Hit records a detected flavor and a few example files that triggered it.
type Result struct {
Hits []Hit
RunsOn [][]string
}
Result is the outcome of a scan.
Scan inspects the source and returns detected flavors + workflow runs-on sets.
Source provides the file paths and (for workflows) file contents of a repo.
Paths are repo-relative and slash-separated.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.