util

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProviderPath

func GetProviderPath(providerRepoName string) (string, error)

func GoModTidy added in v1.2.0

func GoModTidy(providerPath string) error

func ReadOneOf

func ReadOneOf(dir string, filenames ...string) (fullpath string, content []byte, err error)

func RewriteGoMod added in v1.2.0

func RewriteGoMod(providerPath string, sdkVersion string, oldPackagePath string, newPackagePath string) error

func RewriteImportedPackageImports added in v1.2.0

func RewriteImportedPackageImports(filePath string, stringToReplace string, replacement string) error

func SearchLines

func SearchLines(lines []string, search string, start int) int

func SearchLinesPrefix

func SearchLinesPrefix(lines []string, search string, start int) int

func StringSliceContains

func StringSliceContains(ss []string, s string) bool

Types

type ExecError added in v1.2.0

type ExecError struct {
	Err    error
	Stderr string
}

func NewExecError added in v1.2.0

func NewExecError(err error, stderr string) *ExecError

func (*ExecError) Error added in v1.2.0

func (ee *ExecError) Error() string

Jump to

Keyboard shortcuts

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