Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
CompareVersions returns -1 if a < b, 0 if equal (or unparseable), 1 if a > b.
func VersionStaleness ¶
VersionStaleness returns "error" (>1 major behind), "warning" (>=2 minor behind), or "" (up-to-date or unparseable).
Types ¶
type Finding ¶
type Finding struct {
Category string // "dependency", "version", "practice", "constraint"
Severity string // "error", "warning", "info"
Message string
Fix string
}
Finding is a single health-check result for the current project.
type ProjectContext ¶
type ProjectContext struct {
Type string
CAPVersion string
LatestCAP string
Database string
Deployment string
Auth string
HasCDSRC bool
HasDefaultEnv bool
BTPGlobalAccount string
BTPSubaccount string
BTPRegion string
BTPIsTrial bool
CFOrg string
CFSpace string
CFRegion string
Facts []Fact
RawFiles map[string]bool
}
func Detect ¶
func Detect(cwd string) (*ProjectContext, error)
func (*ProjectContext) HasBTPContext ¶
func (ctx *ProjectContext) HasBTPContext() bool
HasBTPContext reports whether any BTP or Cloud Foundry target is detected.
func (*ProjectContext) RebuildFacts ¶
func (ctx *ProjectContext) RebuildFacts()
RebuildFacts re-derives the Facts slice from the current typed fields. Call this after enriching LatestCAP from pack metadata.
Click to show internal directories.
Click to hide internal directories.