ref

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reference

type Reference struct {
	Text     string // The full text of the reference
	Markdown string // The markdown link text
	URL      string // The resolved URL
	Line     int    // Line number where reference was found
	Column   int    // Column number where reference was found
	Type     string // Type of reference: "markdown", "image", "code", "link"
}

Reference represents an external reference in a specification

type ReferenceResolver

type ReferenceResolver struct {
	// contains filtered or unexported fields
}

ReferenceResolver resolves external references in specifications

func NewResolver

func NewResolver(lockfilePath string) *ReferenceResolver

NewResolver creates a new reference resolver

func (*ReferenceResolver) GetDependencies

func (r *ReferenceResolver) GetDependencies() map[string]string

GetDependencies gets the dependencies map

func (*ReferenceResolver) ParseSpec

func (r *ReferenceResolver) ParseSpec(content string) ([]Reference, error)

ParseSpec parses a specification file and extracts references

func (*ReferenceResolver) SetDependencies

func (r *ReferenceResolver) SetDependencies(deps map[string]string) error

SetDependencies sets the dependencies map for validation

func (*ReferenceResolver) ValidateReferences

func (r *ReferenceResolver) ValidateReferences(references []Reference) []ValidationError

ValidateReferences validates all references against the lockfile

type ValidationError

type ValidationError struct {
	Reference Reference
	Field     string
	Message   string
}

ValidationError represents an error from reference validation

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error returns the error message

Jump to

Keyboard shortcuts

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