sourceprofile

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 2 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 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

type ProfileOptions struct {
	RemoveBodyFunc  bool
	ExportedOnly    bool
	ExtensionFilter string
}

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.

Jump to

Keyboard shortcuts

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