Snippets

Patrick Logan 6ez9gn: Untitled snippet

Created by Patrick Logan
1
2
3
4
5
6
7
8
var (
	explicitIRIRune = pr.Character(func(ch rune) bool {
		return !((0x0 <= ch && ch <= 0x20) || strings.ContainsRune(`<>"{}|^\`, ch) || (ch == '`'))
	})
	iriRune = pr.Or(unicode4, unicode8, explicitIRIRune)
	iri = pr.StarString(iriRune) // Have the rdf package do the IRI validation
	absoluteIRI = pr.WithAction(pr.And(lt, iri, gt), pr.Compose(pr.Second, toIRI))
)

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.