Documentation
¶
Overview ¶
Package sourceprofile builds typed profiles describing a project's source tree. It exposes OPS-owned models while delegating file discovery to SRCpack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProfileOptions ¶
ProfileOptions contains the profile settings relevant to source-tree builds.
type SourceTreeProfile ¶
type SourceTreeProfile struct {
Name string
BaseDir string
Description string
Options ProfileOptions
Directories []string
}
SourceTreeProfile is the typed result of selecting source directories. Directories are sorted, root-relative, and collapsed so selected parents replace their descendants. An empty ExtensionFilter means all file types.
func BuildSourceTreeProfile ¶
func BuildSourceTreeProfile(options SourceTreeProfileOptions) (SourceTreeProfile, error)
BuildSourceTreeProfile discovers matching files under Root and returns an OPS-owned typed profile. An empty Root selects the current working directory. The result does not encode YAML; callers can compose it with application configuration without importing SRCpack's config model.
type SourceTreeProfileOptions ¶
type SourceTreeProfileOptions struct {
Root string
ProfileName string
Types []string
TypeDefinitions map[string][]string
Extensions string
ExcludeDirs []string
}
SourceTreeProfileOptions describes a source tree to turn into a profile. Types may contain comma-separated aliases or extensions; unknown aliases are treated as extensions. TypeDefinitions maps aliases to extensions. Extensions adds comma-separated raw extensions, and ExcludeDirs adds root-relative directory names or paths to the built-in exclusions.