versionfile

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package versionfile updates version references in configured files.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnclosedBlockMarker is returned when an x-yeet-start-* block has no matching x-yeet-end.
	ErrUnclosedBlockMarker = errors.New("unclosed x-yeet-start block")
	// ErrNestedBlockMarker is returned when an x-yeet-start-* appears inside an already-open block.
	ErrNestedBlockMarker = errors.New("nested x-yeet-start inside open block")
	// ErrMarkerNoMatch is returned when an inline marker's line has no value matching the expected pattern.
	ErrMarkerNoMatch = errors.New("yeet marker on line without matching version pattern")
	// ErrNoMarkersFound is returned when a configured version file has no yeet markers at all.
	ErrNoMarkersFound = errors.New("file has no yeet markers")
)

Functions

func ApplyGenericMarkers

func ApplyGenericMarkers(content, nextVersion string) (string, bool, error)

ApplyGenericMarkers applies yeet marker-based version replacements to file content. It returns the updated content, whether anything changed, and an error describing any structural problem (unclosed/nested blocks, inline markers without a matching pattern, or a file with no markers at all).

Types

This section is empty.

Jump to

Keyboard shortcuts

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