github.com/goreleaser/goreleaser@v1.25.1/pkg/healthcheck/healthcheck.go (about)

     1  // Package healthcheck checks for missing binaries that the user needs to
     2  // install.
     3  package healthcheck
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/goreleaser/goreleaser/internal/pipe/chocolatey"
     9  	"github.com/goreleaser/goreleaser/internal/pipe/docker"
    10  	"github.com/goreleaser/goreleaser/internal/pipe/nix"
    11  	"github.com/goreleaser/goreleaser/internal/pipe/sbom"
    12  	"github.com/goreleaser/goreleaser/internal/pipe/sign"
    13  	"github.com/goreleaser/goreleaser/internal/pipe/snapcraft"
    14  	"github.com/goreleaser/goreleaser/pkg/context"
    15  )
    16  
    17  // Healthchecker should be implemented by pipes that want checks.
    18  type Healthchecker interface {
    19  	fmt.Stringer
    20  
    21  	// Dependencies return the binaries of the dependencies needed.
    22  	Dependencies(ctx *context.Context) []string
    23  }
    24  
    25  // Healthcheckers is the list of healthchekers.
    26  // nolint: gochecknoglobals
    27  var Healthcheckers = []Healthchecker{
    28  	system{},
    29  	snapcraft.Pipe{},
    30  	sign.Pipe{},
    31  	sign.DockerPipe{},
    32  	sbom.Pipe{},
    33  	docker.Pipe{},
    34  	docker.ManifestPipe{},
    35  	chocolatey.Pipe{},
    36  	nix.NewPublish(),
    37  }
    38  
    39  type system struct{}
    40  
    41  func (system) String() string                           { return "system" }
    42  func (system) Dependencies(_ *context.Context) []string { return []string{"git", "go"} }