mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-20 03:59:26 +02:00
fix: artifact string method switch statement (#1786)
Existing implementation seemed to rely on implicit case fallthrough, which doesn't exist in Go. Moving default return to default case helps catch this error in the future, as it will cause a "missing return" compile error. Signed-off-by: Andy Bursavich <abursavich@gmail.com>
This commit is contained in:
parent
9cbc01050b
commit
005b67dbed
@ -55,16 +55,13 @@ func (t Type) String() string {
|
||||
return "Archive"
|
||||
case UploadableFile:
|
||||
return "File"
|
||||
case UploadableBinary:
|
||||
case Binary:
|
||||
case UploadableBinary, Binary:
|
||||
return "Binary"
|
||||
case LinuxPackage:
|
||||
return "Linux Package"
|
||||
case DockerImage:
|
||||
case PublishableDockerImage:
|
||||
case PublishableDockerImage, DockerImage:
|
||||
return "Docker Image"
|
||||
case PublishableSnapcraft:
|
||||
case Snapcraft:
|
||||
case PublishableSnapcraft, Snapcraft:
|
||||
return "Snap"
|
||||
case Checksum:
|
||||
return "Checksum"
|
||||
@ -72,8 +69,9 @@ func (t Type) String() string {
|
||||
return "Signature"
|
||||
case UploadableSourceArchive:
|
||||
return "Source"
|
||||
default:
|
||||
return "unknown"
|
||||
}
|
||||
return "unknown"
|
||||
}
|
||||
|
||||
// Artifact represents an artifact and its relevant info.
|
||||
|
Loading…
x
Reference in New Issue
Block a user