golang

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsGoSourceCode added in v0.8.0

func ContainsGoSourceCode(p string, d fs.DirEntry) (bool, error)

ContainsGoSourceCode returns true if a directory contains a .go file.

func DevtoolGo added in v0.4.4

func DevtoolGo(env map[string]string, cmd string, args ...string) error

DevtoolGo runs the devtool for Go

func DevtoolGolangCILint added in v0.4.4

func DevtoolGolangCILint(env map[string]string, cmd string, args ...string) error

DevtoolGolangCILint runs the devtool for Golangci-lint

func DownloadModules added in v0.4.0

func DownloadModules(directory string) error

DownloadModules downloads Go modules locally

func FindGoModules

func FindGoModules(base string) ([]string, error)

FindGoModules will search through the base directory to find the all the Go modules.

func FindGoSourceCodeFolders added in v0.8.0

func FindGoSourceCodeFolders(base string) ([]string, error)

FindGoSourceCodeFolders will return a list of directories that contains golang source code

func Generate

func Generate(directory string) error

Generate runs commands described by directives within existing files with the intent to generate Go code. Those commands can run any process but the intent is to create or update Go source files

func HasChanges added in v0.8.0

func HasChanges(goSourceCodeFolders []string) (bool, error)

HasChanges checks if the current branch has any Go changes compared to the main branch

func IsGoModule

func IsGoModule(p string, d fs.DirEntry) bool

IsGoModule returns true if a directory contains a go module.

func Lint

func Lint(directory, golangCILintCfg string) error

Lint runs the linters

func LintFix

func LintFix(directory, golangCILintCfg string) error

LintFix fixes found issues (if it's supported by the linters)

func Test

func Test(directory string) error

Test automates testing the packages named by the import paths, see also: go test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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