modfile

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicStanza added in v0.2.0

type BasicStanza struct {
	Comment      string
	Dependencies []Dependency
}

type Content

type Content struct {
	Module     string
	Go         string
	Toolchain  ToolchainStanza
	Direct     BasicStanza
	Indirect   BasicStanza
	Replace    ReplaceStanza
	ReplaceSub ReplaceStanza // sub modules, e.g. "=> ./api"
	Exclude    BasicStanza
}

func Merge

func Merge(ent, oss *Content) *Content

Merge will combine the changes of o onto c, resolving conflicts a way that makes sense.

e.g. oss - from the open source repository ent - from the enterprise repository and we are merging in changes from oss onto ent, which may cause conflicts due to ent being a superset of oss.

func Open

func Open(path string) (*Content, error)

func (*Content) String

func (c *Content) String() string

func (*Content) Write

func (c *Content) Write(w io.Writer) error

type Dependency

type Dependency struct {
	Replacement bool
	Name        string
	Version     semantic.Tag
}

func (Dependency) Cmp

func (d Dependency) Cmp(o Dependency) int

func (Dependency) Hash

func (d Dependency) Hash() string

func (Dependency) String

func (d Dependency) String() string

type ReplaceStanza

type ReplaceStanza struct {
	Comment      string
	Replacements []Replacement
}

type Replacement

type Replacement struct {
	Orig Dependency
	Next Dependency
}

func (Replacement) Cmp

func (r Replacement) Cmp(o Replacement) int

func (Replacement) Hash

func (r Replacement) Hash() string

func (Replacement) String

func (r Replacement) String() string

type ToolchainStanza added in v0.2.0

type ToolchainStanza struct {
	Comment string
	Version string // arbitrary
}

Jump to

Keyboard shortcuts

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