You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			|  | 4 years ago | |
|---|---|---|
| .github | 4 years ago | |
| testdata | 4 years ago | |
| .codebeatsettings | 4 years ago | |
| LICENSE | 4 years ago | |
| Makefile | 4 years ago | |
| README.md | 4 years ago | |
| SECURITY.md | 4 years ago | |
| badge.go | 4 years ago | |
| badge_test.go | 4 years ago | |
		
			
				
				README.md
			
		
		
			
			
		
	
	Installation • Usage example • Examples • Build Status • Contributing • Thanks • License
badge is a Go package for generating SVG badges.
Installation
Make sure you have a working Go 1.15+ workspace (instructions), then:
go get -d pkg.re/essentialkaos/go-badge.v1
For update to latest stable release, do:
go get -d -u pkg.re/essentialkaos/go-badge.v1
Usage example
package main
// ////////////////////////////////////////////////////////////////////////// //
import (
  "fmt"
  "pkg.re/essentialkaos/go-badge.v1"
)
// ////////////////////////////////////////////////////////////////////////// //
func main() {
  g, err := badge.NewGenerator("Verdana.ttf", 11)
  if err != nil {
    panic(err)
  }
  fmt.Println(string(g.GeneratePlastic("status", "ok", "#97ca00")))
}
Examples
| Flat | Flat Square | Plastic | 
|---|---|---|
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
| flat | square | plastic | 
Build Status
| Branch | Status | 
|---|---|
| master | |
| develop | 
Contributing
Before contributing to this project please read our Contributing Guidelines.
Thanks
We would like to thank:
- All authors and contributors of shields.io service;
- All authors of freetypepackage;
- @narqo for go-badgepackage.