Downloads

Downloading golangci-lint

How to Download and Install golangci-lint

To get started with golangci-lint, select and download the appropriate package for your operating system from the list below:

  • Checksums File:
    golangci-lint-1.61.0-checksums.txt – 5.24 KB

  • macOS:

    • darwin-amd64 – 11.3 MB
    • darwin-arm64 – 10.7 MB
  • FreeBSD:

    • freebsd-386 – 10.2 MB
    • freebsd-amd64 – 11 MB
    • freebsd-armv6 – 10.3 MB
    • freebsd-armv7 – 10.2 MB
  • Illumos:

    • illumos-amd64 – 11 MB
  • Linux:

    • Debian-Based:
      • linux-386 – 10.2 MB
      • linux-amd64 – 11 MB
      • linux-arm64 – 10.2 MB
      • linux-armv6 – 10.3 MB
      • linux-armv7 – 10.3 MB
      • linux-loong64 – 10.3 MB
      • linux-mips64 – 9.66 MB
      • linux-mips64le – 9.5 MB
      • linux-ppc64le – 10.1 MB
      • linux-riscv64 – 10.3 MB
      • linux-s390x – 10.7 MB
    • RPM-Based:
      • linux-386 – 10.6 MB
      • linux-amd64 – 11.4 MB
      • linux-arm64 – 10.5 MB
      • linux-armv6 – 10.6 MB
      • linux-armv7 – 10.6 MB
      • linux-loong64 – 10.6 MB
      • linux-mips64 – 10.1 MB
      • linux-mips64le – 9.83 MB
      • linux-ppc64le – 10.4 MB
      • linux-riscv64 – 10.7 MB
      • linux-s390x – 11.2 MB
  • NetBSD:

    • netbsd-386 – 10.2 MB
    • netbsd-amd64 – 11 MB
    • netbsd-arm64 – 10.2 MB
    • netbsd-armv6 – 10.2 MB
    • netbsd-armv7 – 10.2 MB
  • Source Code:

    • Source Code (zip) – 1.66 MB
    • Source Code (tar.gz) – 1.66 MB
  • Windows:

    • windows-386 – 10.6 MB
    • windows-amd64 – 11.2 MB
    • windows-arm64 – 10.3 MB
    • windows-armv6 – 10.5 MB
    • windows-armv7 – 10.4 MB

Installation Instructions

For macOS:

  1. Download the appropriate .tar.gz file.
  2. Extract the archive using tar -xzf golangci-lint-1.61.0-darwin-amd64.tar.gz.
  3. Move the binary to a directory included in your PATH.

For Linux:

  1. Choose the package that matches your distribution (.deb for Debian-based, .rpm for RPM-based).
  2. Install the package using your package manager:
    • Debian-based: sudo dpkg -i golangci-lint-1.61.0-linux-amd64.deb
    • RPM-based: sudo rpm -i golangci-lint-1.61.0-linux-amd64.rpm
  3. Verify the installation by checking the binary path.

For Windows:

  1. Download the .zip file.
  2. Extract the contents using a tool like WinRAR or 7-Zip.
  3. Add the extracted directory to your PATH environment variable.

Configuration

  1. Create a .golangci.yml file in your project root to configure golangci-lint.
  2. Define the linters you wish to use and any custom configuration options in this YAML file.
  3. Refer to the golangci-lint documentation for detailed configuration options.

Running golangci-lint

  1. Open a terminal or command prompt.
  2. Navigate to your project directory.
  3. Run golangci-lint run to start the linting process.