Skip to content

This looks like a bug #39

@jaydonnell

Description

@jaydonnell

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions