version_file_common

package
v0.0.0-...-8ed7812 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPinnedRevs

func GetPinnedRevs(ctx context.Context, deps []*config.VersionFileConfig, getFile GetFileFunc) (map[string]string, error)

GetPinnedRevs reads files using the given GetFileFunc to retrieve the given pinned revisions. File retrievals are cached for efficiency.

func UpdateDep

func UpdateDep(ctx context.Context, primaryDep *config.DependencyConfig, rev *revision.Revision, getFile GetFileFunc) (map[string]string, error)

UpdateDep updates the given dependency to the given revision, also updating any transitive dependencies to the revisions specified in the new revision of the primary dependency. Returns a map whose keys are file names to update and values are their updated contents.

Types

type GetFileFunc

type GetFileFunc func(ctx context.Context, path string) (string, error)

GetFileFunc is a function which retrieves the contents of a file.

Jump to

Keyboard shortcuts

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