Added and corrected comments
This commit is contained in:
3
icon.go
3
icon.go
@@ -10,10 +10,13 @@ type Icon struct {
|
||||
URI IRI `xml:"uri"`
|
||||
}
|
||||
|
||||
// NewIcon creates a new Icon. It returns a *Icon.
|
||||
func NewIcon(uri string) *Icon {
|
||||
return &Icon{URI: IRI(uri)}
|
||||
}
|
||||
|
||||
// Check checks the Icon for incompatibilities with RFC4287. It returns an
|
||||
// error.
|
||||
func (i *Icon) Check() error {
|
||||
if i.URI == "" {
|
||||
return errors.New("uri element of icon empty")
|
||||
|
Reference in New Issue
Block a user