Documentation ¶
Index ¶
- func DownloadAllGolangCILintVersions(dest string, minVersion string) ([]string, error)
- func FetchGolangCILintInstaller(scriptPath string) error
- func GetDefaultPath() (string, error)
- func GetGobin() (string, error)
- func GetGobinPath(name string) (string, error)
- func GetGolangCILintVersions() ([]string, error)
- func GetNameForVersion(version string) string
- func GetPathForVersion(version string) (string, error)
- func InstallGolangCILintVersion(version, dest, installer, tempDir string) error
- type GitHubRelease
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadAllGolangCILintVersions ¶
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 ¶
FetchGolangCILintInstaller will download the golangci-lint installer to a temporary file location.
func GetDefaultPath ¶
GetDefaultPath returns the full path for the default version of golangci-lint.
func GetGobinPath ¶
GetGobinPath returns the full path for a filename in $GOPATH/bin.
func GetGolangCILintVersions ¶
GetGolangCILintVersions returns a list of versions of golangci-lint on GitHub.
func GetNameForVersion ¶
GetNameForVersion returns the file name for a specific version of golangci-lint.
func GetPathForVersion ¶
GetPathForVersion returns the full path for a specific version of golangci-lint.
func InstallGolangCILintVersion ¶
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.