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
Name | Type | Default Value | Description |
---|---|---|---|
segmentPrefix | String ! | "![Dagger]" | No description provided |
imgShieldLink | String ! | "https://img.shields.io/badge/dynamic/json" | No description provided |
rawUrl | String ! | - | 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.
link() 🔗
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
Name | Type | Default Value | Description |
---|---|---|---|
file | File ! | - | A file. |
Example
func (m *myModule) example(segmentPrefix string, imgShieldLink string, rawUrl string, file *File) *File {
return dag.
DaggerBadge(segmentPrefix, imgShieldLink, rawUrl).
AddToReadme(file)
}