Dagger
Search

dagger-badge

Create a shield.io badge for your dagger project.

Installation

dagger install github.com/pjmagee/dagger-badge@262fbd7bcd8c80b4862b05983ec5faf64fdcf6b3

Entrypoint

Return Type
DaggerBadge !
Arguments
NameTypeDefault ValueDescription
segmentPrefixString !"![Dagger]"No description provided
imgShieldLinkString !"https://img.shields.io/badge/dynamic/json"No description provided
rawUrlString !-The URL to the JSON file containing the version information
Example
func (m *myModule) example(segmentPrefix string, imgShieldLink string, rawUrl string) *DaggerBadge  {
	return dag.
			DaggerBadge(segmentPrefix, imgShieldLink, rawUrl)
}

Types

DaggerBadge 🔗

Create a shield.io badge for your dagger project.

Create a shield.io badge for your dagger project.

Return Type
String !
Example
func (m *myModule) example(ctx context.Context, segmentPrefix string, imgShieldLink string, rawUrl string) string  {
	return dag.
			DaggerBadge(segmentPrefix, imgShieldLink, rawUrl).
			Link(ctx)
}

addToReadme() 🔗

Add the badge to the provided README file.

Return Type
File !
Arguments
NameTypeDefault ValueDescription
fileFile !-A file.
Example
func (m *myModule) example(segmentPrefix string, imgShieldLink string, rawUrl string, file *File) *File  {
	return dag.
			DaggerBadge(segmentPrefix, imgShieldLink, rawUrl).
			AddToReadme(file)
}