Added and corrected comments
This commit is contained in:
@@ -13,10 +13,13 @@ type Generator struct {
|
||||
Text string `xml:"text"`
|
||||
}
|
||||
|
||||
// NewGenerator creates a new Generator. It returns a *Generator.
|
||||
func NewGenerator(text string) *Generator {
|
||||
return &Generator{Text: html.UnescapeString(text)}
|
||||
}
|
||||
|
||||
// Check checks the Generator for incompatibilities with RFC4287. It returns an
|
||||
// error.
|
||||
func (g *Generator) Check() error {
|
||||
if g.URI != "" {
|
||||
if !isValidIRI(g.URI) {
|
||||
|
Reference in New Issue
Block a user