bufcasdiff

package
v0.0.0-...-20f93d5 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestDiffOutputFormatText = iota + 1
	ManifestDiffOutputFormatMarkdown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ManifestDiff

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

ManifestDiff represents a change in between two CAS manifests.

func DiffModuleDirectory

func DiffModuleDirectory(
	ctx context.Context,
	dirPath string,
	from string,
	to string,
) (*ManifestDiff, error)

DiffModuleDirectory computes the diff between two refs or two digests in the module directory at dirPath.

If a state.json file is present, from/to are resolved as ref names against it, otherwise, dirPath is treated as a CAS directory and from/to are manifest filenames directly.

func (*ManifestDiff) String

func (d *ManifestDiff) String(format ManifestDiffOutputFormat) string

String returns the diff output in the given format. On invalid or unknown format, this function defaults to ManifestDiffOutputFormatText.

func (*ManifestDiff) Summary

func (d *ManifestDiff) Summary() string

Summary returns a manifest diff summary in the shape of:

%d files changed: %d removed, %d renamed, %d added, %d changed content.

type ManifestDiffOutputFormat

type ManifestDiffOutputFormat int

ManifestDiffOutputFormat is the format in which a manifest diff can output its results.

Jump to

Keyboard shortcuts

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