modfile

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 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[PathMayWithVersion]ReplaceTarget
	// Require same as go root
	// require { module: version }
	// indirect require { module:: version }
	Require map[string]Require
	// 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
	VcsVersion string
}

type PathMayWithVersion

type PathMayWithVersion struct {
	Path       string
	Version    string
	VcsVersion string
}

func ParsePathMayWithVersion

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

func (PathMayWithVersion) IsLocalReplace

func (r PathMayWithVersion) IsLocalReplace() bool

func (PathMayWithVersion) MarshalText

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

func (PathMayWithVersion) String

func (r PathMayWithVersion) String() string

func (*PathMayWithVersion) UnmarshalText

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

type ReplaceTarget

type ReplaceTarget struct {
	PathMayWithVersion
	Import string
}

type Require

type Require struct {
	ModVersion
	Indirect bool
}

Jump to

Keyboard shortcuts

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