How runtimeconditions/go-rc-profiler works
go-rc-profiler statically analyzes a Go workload and emits a validated Runtime Conditions Profile without executing workload code. The principal workflow loads and type-checks source, resolves installed generated bindings, reconstructs declaration values, validates the assembled profile, then serializes it to YAML or an output file. Separate CLI commands inspect one or all imported bindings. The graph preserves integrity checking, dependency closure, and schema validation as distinct concerns. Some internal calls are shown only in partial excerpts; uncertain links are omitted rather than inferred from package names.
Main entry points: generated.go Profile extraction · cli.go CLI commands · generated_profile.go Profile finalization · packages.go Go source loading
Components 18
Command interface
- Executable entry
main.go - CLI commands
cli/cli.go
Workload analysis
- Go source loading
extractor/internal/gosource/packages.go - Go semantic data
extractor/internal/gosource/semantic.go - Profile extraction
extractor/generated.go - Declaration reader
extractor/generated_reader.go - Static value decoding
extractor/generated_values.go
Binding verification
- Imported bindings
extensioncheck/imported.go - Dependency integrity
extensioncheck/packagegraph.go - Extension references
extensioncheck/reference.go - Release identity checks
extensioncheck/release.go
Profile validation
- Profile finalization
extensioncheck/generated_profile.go - Core schema checks
extensioncheck/coreprofile.go - Extension schema checks
extensioncheck/schema.go - YAML serialization
extractor/profile_yaml.go
Other components
- Developer
- Go workload
- Runtime Conditions Profile
Connections 17
- Developer → Executable entry: runs
README.md - Executable entry → CLI commands: dispatches
main.go - CLI commands → Profile extraction: generates via
cli/cli.go - Profile extraction → Go source loading: loads and type-checks
extractor/generated.go - Go source loading → Go semantic data: builds type data
extractor/internal/gosource/packages.go - Profile extraction → Imported bindings: resolves bindings
extractor/generated.go - Profile extraction → Declaration reader: reads declarations
extractor/generated.go - Declaration reader → Static value decoding: decodes values
- Profile extraction → Profile finalization: finalizes profile
extractor/generated.go - Profile finalization → Core schema checks: validates core schema
extensioncheck/generated_profile.go - Profile finalization → Extension schema checks: validates extensions
extensioncheck/generated_profile.go - CLI commands → YAML serialization: marshals output
cli/cli.go - YAML serialization → Runtime Conditions Profile: serializes
README.md - Go workload → Go source loading: provides source
README.md - CLI commands → Imported bindings: validates bindings
cli/cli.go - Imported bindings → Dependency integrity: checks dependency closure
- Dependency integrity → Release identity checks: checks release identity