modfile

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ModFilename = "cue.mod/module.cue"

Variables

This section is empty.

Functions

func LoadModFile

func LoadModFile(dir string, m *ModFile) (bool, error)

Types

type ModFile

type ModFile struct {
	// Module name
	Module string

	// Replace
	// version limit
	Replace map[VersionedPathIdentity]ReplaceTarget
	// Require same as go root
	// require { module: version }
	// indirect require { module:: version }
	Require map[string]Requirement
	// contains filtered or unexported fields
}

func (*ModFile) Bytes

func (m *ModFile) Bytes() []byte

func (*ModFile) String

func (m *ModFile) String() string

type ModVersion

type ModVersion struct {
	Version string
	VcsRef  string
}

func (ModVersion) Exactly added in v0.4.5

func (mv ModVersion) Exactly() bool

type ReplaceTarget

type ReplaceTarget struct {
	VersionedPathIdentity
	Import string
}

type Requirement added in v0.4.5

type Requirement struct {
	ModVersion
	Indirect bool
}

type VersionedPathIdentity added in v0.4.5

type VersionedPathIdentity struct {
	Path string
	ModVersion
}

func ParsePathMayWithVersion

func ParsePathMayWithVersion(v string) (*VersionedPathIdentity, error)

func (VersionedPathIdentity) IsLocalReplace added in v0.4.5

func (r VersionedPathIdentity) IsLocalReplace() bool

func (VersionedPathIdentity) MarshalText added in v0.4.5

func (r VersionedPathIdentity) MarshalText() (text []byte, err error)

func (VersionedPathIdentity) String added in v0.4.5

func (r VersionedPathIdentity) String() string

func (*VersionedPathIdentity) UnmarshalText added in v0.4.5

func (r *VersionedPathIdentity) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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