1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-06 09:09:29 +02:00

refactor: pointer to artifact (#1110)

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker
2019-08-12 17:44:48 -03:00
committed by GitHub
parent 9c675218ad
commit b477ffa095
32 changed files with 149 additions and 149 deletions

View File

@@ -82,7 +82,7 @@ func (t *Template) WithEnv(e map[string]string) *Template {
}
// WithArtifact populates fields from the artifact and replacements
func (t *Template) WithArtifact(a artifact.Artifact, replacements map[string]string) *Template {
func (t *Template) WithArtifact(a *artifact.Artifact, replacements map[string]string) *Template {
var bin = a.Extra[binary]
if bin == nil {
bin = t.fields[projectName]

View File

@@ -45,7 +45,7 @@ func TestWithArtifact(t *testing.T) {
t.Run(expect, func(tt *testing.T) {
tt.Parallel()
result, err := New(ctx).WithArtifact(
artifact.Artifact{
&artifact.Artifact{
Name: "not-this-binary",
Goarch: "amd64",
Goos: "linux",
@@ -64,7 +64,7 @@ func TestWithArtifact(t *testing.T) {
t.Run("artifact without binary name", func(tt *testing.T) {
tt.Parallel()
result, err := New(ctx).WithArtifact(
artifact.Artifact{
&artifact.Artifact{
Name: "another-binary",
Goarch: "amd64",
Goos: "linux",