Usage example • Examples • CI Status • Contributing • Thanks • License
badge
is a Go package for generating SVG badges.
package main
// ////////////////////////////////////////////////////////////////////////// //
import (
"fmt"
"github.com/essentialkaos/go-badge"
)
// ////////////////////////////////////////////////////////////////////////// //
func main() {
g, err := badge.NewGenerator("Verdana.ttf", 11)
if err != nil {
panic(err)
}
fmt.Println(string(g.GeneratePlastic("status", "ok", "#97ca00")))
}
Flat | Flat Square | Plastic | Flat (Simple) | Flat Square (Simple) | Plastic (Simple) |
---|---|---|---|---|---|
All badges are generated with the latest version of the package.
Branch | Status |
---|---|
master |
|
develop |
Before contributing to this project please read our Contributing Guidelines.
We would like to thank:
- All authors and contributors of shields.io service;
- All authors of
freetype
package; - @narqo for
go-badge
package.