19 lines
227 B
Go
19 lines
227 B
Go
package svg
|
|
|
|
import (
|
|
"fmt"
|
|
"html"
|
|
)
|
|
|
|
type (
|
|
Class string
|
|
)
|
|
|
|
func (Class) PrintKey() string {
|
|
return "class"
|
|
}
|
|
|
|
func (c Class) PrintValue() (string, bool) {
|
|
return fmt.Sprintf(`"%s"`, html.EscapeString(string(c))), true
|
|
}
|