linkdeps

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LinkDepsFilename is the standard file name for link.deps files.
	LinkDepsFilename = "link.deps"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkDeps

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

LinkDeps represents the contents of a link.deps file.

func FromArchive

func FromArchive(archive string) (res LinkDeps, err error)

FromArchive reads a link.deps file from the provided Go archive file. Returns an empty LinkDeps if the archive does not contain a link.deps file.

func Read

func Read(r io.Reader) (l LinkDeps, err error)

Read reads a link.deps file content from the provided reader.

func ReadFile

func ReadFile(filename string) (LinkDeps, error)

ReadFile reads a link.deps file from the provided filename.

func (*LinkDeps) Add

func (l *LinkDeps) Add(importPath string)

Add registers a new import path in this LinkDeps instance.

func (*LinkDeps) Dependencies

func (l *LinkDeps) Dependencies() []string

Dependencies returns all import paths registered in this LinkDeps instance.

func (*LinkDeps) Empty

func (l *LinkDeps) Empty() bool

Empty returns true if this LinkDeps instance is empty.

func (*LinkDeps) Len

func (l *LinkDeps) Len() int

Len returns the number of import paths registered in this LinkDeps instance.

func (*LinkDeps) Write

func (l *LinkDeps) Write(w io.Writer) error

Write writes this LinkDeps instance to the provided writer.

func (*LinkDeps) WriteFile

func (l *LinkDeps) WriteFile(filename string) error

WriteFile writes this LinkDeps instance to the provided filename.

Jump to

Keyboard shortcuts

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