github.phpd.cn/goreleaser/goreleaser@v0.92.0/internal/pipe/project/project.go (about) 1 // Package project sets "high level" defaults related to the project. 2 package project 3 4 import "github.com/goreleaser/goreleaser/pkg/context" 5 6 // Pipe implemens defaulter to set the project name 7 type Pipe struct{} 8 9 func (Pipe) String() string { 10 return "project name" 11 } 12 13 // Default set project defaults 14 func (Pipe) Default(ctx *context.Context) error { 15 if ctx.Config.ProjectName == "" { 16 ctx.Config.ProjectName = ctx.Config.Release.GitHub.Name 17 } 18 return nil 19 }