packages

package
v0.0.0-...-f9b13d0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidModule = fmt.Errorf("go.mod does not allow to include other versions of module")

Functions

func EditModRequired

func EditModRequired(packagePath, newModule string) error

func EditModule

func EditModule(packagePath, newModule string) error

func GoModValidate

func GoModValidate(packagePath string) error

校验go.mod

func ModFile

func ModFile(goModPath string) (*modfile.File, error)

获取go.mod文件信息

func ReplaceImport

func ReplaceImport(sourceFile string, baseModule string, majorVersion uint64) error

func UpdatePackageModule

func UpdatePackageModule(newVersion string, packagePath, baseModule string, suffixs ...string) error

使用新的版本号(newVersion)更新包(baseModule)的引用

Types

This section is empty.

Jump to

Keyboard shortcuts

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