Documentation ¶
Overview ¶
Package tmpl provides templating utilities for goreleaser.
Index ¶
- type ExpectedSingleEnvErr
- type Fields
- type Template
- func (t *Template) Apply(s string) (string, error)
- func (t *Template) ApplySingleEnvOnly(s string) (string, error)
- func (t *Template) WithArtifact(a *artifact.Artifact, replacements map[string]string) *Template
- func (t *Template) WithBuildOptions(opts build.Options) *Template
- func (t *Template) WithEnv(e map[string]string) *Template
- func (t *Template) WithEnvS(envs []string) *Template
- func (t *Template) WithExtraFields(f Fields) *Template
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectedSingleEnvErr ¶
type ExpectedSingleEnvErr struct{}
func (ExpectedSingleEnvErr) Error ¶
func (e ExpectedSingleEnvErr) Error() string
type Fields ¶
type Fields map[string]interface{}
Fields that will be available to the template engine.
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
Template holds data that can be applied to a template string.
func (*Template) ApplySingleEnvOnly ¶
ApplySingleEnvOnly enforces template to only contain a single environment variable and nothing else.
func (*Template) WithArtifact ¶
WithArtifact populates Fields from the artifact and replacements.
func (*Template) WithBuildOptions ¶
func (*Template) WithEnvS ¶
WithEnvS overrides template's env field with the given KEY=VALUE list of environment variables.
func (*Template) WithExtraFields ¶
WithExtraFields allows to add new more custom fields to the template. It will override fields with the same name.
Click to show internal directories.
Click to hide internal directories.