-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
If I'm reading this code correctly, you are checking if something is an IRI with strings.Contains(iri, ":"). This will match strings which have colons but are not IRIs.
func (jldp *JsonLdProcessor) expand(input interface{}, opts *JsonLdOptions) ([]interface{}, error) {
// 1)
// TODO: look into promises
var remoteContext string
// 2)
if iri, isString := input.(string); isString && strings.Contains(iri, ":") {
If that is what this code intends to do, maybe use this
import "net/url"
...
u, err := url.ParseRequestURI("http://google.com/")
if err != nil {
panic(err) // not a valid URI
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels