Categorygithub.com/essentialkaos/go-badge
modulepackage
1.4.1
Repository: https://github.com/essentialkaos/go-badge.git
Documentation: pkg.go.dev

# README

GitHub Actions CI Status GoReportCard Coverage Status
Codebeat badge Codacy badge GitHub Actions CodeQL Status

Usage exampleExamplesCI StatusContributingThanksLicense


badge is a Go package for generating SVG badges.

Usage example

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")))
}

Examples

FlatFlat SquarePlasticFlat (Simple)Flat Square (Simple)Plastic (Simple)
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple
flatsquareplasticflat-simplesquare-simpleplastic-simple

All badges are generated with the latest version of the package.

CI Status

BranchStatus
masterCI
developCI

Contributing

Before contributing to this project please read our Contributing Guidelines.

Thanks

We would like to thank:

License

Apache License, Version 2.0

# Functions

NewGenerator creates new badge generator using given path to font file.
NewGeneratorFromBytes creates a new card generator using given font data.
NewGeneratorFromReader creates a new card generator using a reader that provides font data.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
default font offset.
default letter spacing.

# Structs

Generator is badge generator.