From a6965e6272a952602765b9f5e85b865ef9c44914 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Sat, 15 Sep 2018 18:53:59 -0300 Subject: [PATCH] fix: remove dep on stringer --- Makefile | 3 --- internal/artifact/artifact.go | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b25380bfd..1aff0316e 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,6 @@ export PATH := ./bin:$(PATH) # Install all the build and lint dependencies setup: - go get -u golang.org/x/tools/cmd/stringer - go get -u golang.org/x/tools/cmd/cover curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh curl -sfL https://install.goreleaser.com/github.com/gohugoio/hugo.sh | sh curl -sfL https://install.goreleaser.com/github.com/caarlos0/bandep.sh | sh @@ -55,7 +53,6 @@ ci: build test lint # Build a beta version of goreleaser build: - go generate ./... go build .PHONY: build diff --git a/internal/artifact/artifact.go b/internal/artifact/artifact.go index 6767018e7..8cdbd0c78 100644 --- a/internal/artifact/artifact.go +++ b/internal/artifact/artifact.go @@ -32,6 +32,26 @@ const ( Signature ) +func (t Type) String() string { + switch t { + case UploadableArchive: + return "Archive" + case UploadableBinary: + return "Binary" + case Binary: + return "Binary" + case LinuxPackage: + return "LinuxPackage" + case DockerImage: + return "DockerImage" + case Checksum: + return "Checksum" + case Signature: + return "Signature" + } + return "unknown" +} + // Artifact represents an artifact and its relevant info type Artifact struct { Name string