1
0
Fork 0
mirror of https://github.com/Luzifer/badge-gen.git synced 2024-11-09 22:00:05 +00:00
badge-gen/service_static.go

21 lines
381 B
Go

package main
import "errors"
func init() {
registerServiceHandler("static", func(params []string) (title, text, color string, err error) {
if len(params) < 2 {
err = errors.New("You need to provide title and text")
return
}
if len(params) < 3 {
params = append(params, defaultColor)
}
title = params[0]
text = params[1]
color = params[2]
return
})
}