modsync

package
v0.6.69 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ReplacePattern = `replace\s?\((\n|.)*?\)`
View Source
const RequirePattern = `require\s?\((\n|.)*?\)`

Variables

View Source
var ReplacePatternRegex *regexp.Regexp
View Source
var RequirePatternRegex *regexp.Regexp

Functions

This section is empty.

Types

type GoMod

type GoMod struct {
	ReplacedVersions [][]Package //Each subarray will have two packages. A "from package" and "to package"
	RequiredVersions []Package
}

func New

func New(f io.Reader) (*GoMod, error)

NewGoMod takes an io.Reader to a go.mod and returns GoMod struct

func (*GoMod) PrintReplacedVersions

func (g *GoMod) PrintReplacedVersions()

For debugging

func (*GoMod) PrintRequiredVersions

func (g *GoMod) PrintRequiredVersions()

For debugging

func (*GoMod) SyncRequire

func (g *GoMod) SyncRequire(f io.Reader, throwerr bool) (gomod string, err error)

type Package

type Package struct {
	Name     string
	Version  string
	Indirect bool
}

Jump to

Keyboard shortcuts

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