modx

package
v0.47.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find added in v0.42.0

func Find(m *modfile.File, path string) module.Version

Find locates the versions for the given import path. returns zero version if none are found.

func FindModuleRoot added in v0.43.0

func FindModuleRoot(dir string) (cleaned string, err error)

FindModuleRoot pulled from: https://github.com/golang/go/blob/88e564edb13f1596c12ad16d5fd3c7ac7deac855/src/cmd/dist/build.go#L1595

func Mutate added in v0.42.0

func Mutate(dir string, mutation func(*modfile.File) error) (err error)

Mutate the go.mod file in the given directory.

func Open

func Open(dir string) (m *modfile.File, err error)

Open the go.mod file in the given directory

func Print added in v0.42.0

func Print(m *modfile.File) (s string, err error)

Print the modfile.

func RemoveModule added in v0.42.0

func RemoveModule(m *modfile.File, path string) error

RemoveModule drop a module from go.mod entirely.

func Replace added in v0.42.0

func Replace(dir string, m *modfile.File) (err error)

Replace the go.mod file in the given directory.

func Version added in v0.42.0

func Version(m *modfile.File, path string) module.Version

Version locates the module version for the given import path. returns zero version if none are found. Version differs from find in that it returns the version in use vs the version required.

Types

This section is empty.

Jump to

Keyboard shortcuts

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