go_update

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoResolve added in v0.0.17

func GoResolve(dir string, modPath string, version string) (string, error)

func Replace

func Replace(dir string) (absDir string, modulePath string, err error)

Replace checks if the given directory exists and contains a valid Go module, returns the absolute path of the directory and the module path

func ResolveModPathFromPossibleDir added in v0.0.17

func ResolveModPathFromPossibleDir(dirOrModPath string) (dir string, modPath string, err error)

func Update

func Update(dir string) error

Types

type GoMod

type GoMod struct {
	Module struct {
		Path string `json:"Path"`
	} `json:"Module"`
}

type ModuleInfo

type ModuleInfo struct {
	Module struct {
		Path string `json:"Path"`
	} `json:"Module"`
	Require []struct {
		Path    string `json:"Path"`
		Version string `json:"Version"`
	} `json:"Require"`
}

func GetModuleInfo added in v0.0.17

func GetModuleInfo(dir string) (*ModuleInfo, error)

Jump to

Keyboard shortcuts

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