A Go library for generating sprite-maps from SVG Icon interfaces
Go to file
jolheiser 6e9173dd23
Clear width/height from attributes
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2019-12-08 21:00:55 -06:00
go.mod Initial commit 2019-12-07 00:19:30 -06:00
go.sum Initial commit 2019-12-07 00:19:30 -06:00
LICENSE Initial commit 2019-12-07 00:19:30 -06:00
README.md Add map structs for convenience 2019-12-07 14:15:52 -06:00
sprite.go Clear width/height from attributes 2019-12-08 21:00:55 -06:00

sprite

A library that takes in Icon interfaces and generates a sprite-map for them.

All go-icon libraries support the required interface.

Usage

package main

import "fmt"

import "gitea.com/go-icon/octicon"
import "gitea.com/go-icon/sprite"

func main() {
    m := sprite.New()
    
    for _, name := range octicon.Icons {
        m.Add(name, octicon.Icon(name))
    }
    
    if err := m.Parse(); err != nil {
        panic(err)
    }
    
    fmt.Println(m.XML())

}

License

MIT License