bazel

package
v0.0.0-...-efd23c5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBazelFile

func IsBazelFile(file string) bool

IsBazelFile returns true if the filename looks like a Bazel file.

func ParseDeps

func ParseDeps(content string) (map[DependencyID]Dependency, error)

ParseDeps parses the file contents and returns all dependencies, keyed by ID.

func SetDep

func SetDep(content string, id DependencyID, version, sha256 string) (string, error)

SetDep parses the file contents, updates the version of the given dependency, and returns the new file contents or any error that occurred.

Types

type Dependency

type Dependency struct {
	ID      DependencyID
	Version string

	SHA256 string
	// contains filtered or unexported fields
}

Dependency represents one dependency version pin.

func GetDep

func GetDep(content string, dep DependencyID) (Dependency, error)

GetDep parses the file contents and returns the given dependency.

func (Dependency) Validate

func (d Dependency) Validate() error

Validate returns an error if the Dependency is not valid.

type DependencyID

type DependencyID string

DependencyID represents the unique identifier for a dependency.

Jump to

Keyboard shortcuts

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