golangcilint

package
v0.0.0-...-2443963 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadAllGolangCILintVersions

func DownloadAllGolangCILintVersions(dest string, minVersion string) ([]string, error)

DownloadAllGolangCILintVersions will download all known versions of golangci-lint to dest. The downloaded binaries will be named as `golangci-lint-$version`, e.g. `golangci-lint-v1.31.0`. If minVersion is not empty, any versions equal or lower to minVersion will not be installed. Returns list of versions that were installed, or any error encountered if any.

func FetchGolangCILintInstaller

func FetchGolangCILintInstaller(scriptPath string) error

FetchGolangCILintInstaller will download the golangci-lint installer to a temporary file location.

func GetDefaultPath

func GetDefaultPath() (string, error)

GetDefaultPath returns the full path for the default version of golangci-lint.

func GetGobin

func GetGobin() (string, error)

GetGobin returns the full path of $GOPATH/bin, creating the directory as necessary.

func GetGobinPath

func GetGobinPath(name string) (string, error)

GetGobinPath returns the full path for a filename in $GOPATH/bin.

func GetGolangCILintVersions

func GetGolangCILintVersions() ([]string, error)

GetGolangCILintVersions returns a list of versions of golangci-lint on GitHub.

func GetNameForVersion

func GetNameForVersion(version string) string

GetNameForVersion returns the file name for a specific version of golangci-lint.

func GetPathForVersion

func GetPathForVersion(version string) (string, error)

GetPathForVersion returns the full path for a specific version of golangci-lint.

func InstallGolangCILintVersion

func InstallGolangCILintVersion(version, dest, installer, tempDir string) error

InstallGolangCILintVersion will run the installer script against a specific version, saving it to dest. To install latest version, specify "latest" as version. If installer is empty, it will download to a temporary path and be removed afterwards. If tempDir is empty, a temporary directory will be created and be removed afterwards.

Types

type GitHubRelease

type GitHubRelease struct {
	Name        string `json:"name"`
	TagName     string `json:"tag_name"`
	URL         string `json:"url"`
	CreatedAt   string `json:"created_at"`
	PublishedAt string `json:"published_at"`
}

Jump to

Keyboard shortcuts

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