// Copyright 2024 Matthew Rich . All rights reserved. package folio import ( "net/url" "decl/internal/data" ) var ( ) /* Create a new resource using a parsed URI */ func NewResourceFromParsedURI(u *url.URL, document data.Document) (newResource data.Resource, err error) { if document == nil { declaration := NewDeclaration() if err = declaration.NewResourceFromParsedURI((*ParsedURI)(u)); err == nil { return declaration.Attributes, err } } else { newResource, err = document.NewResourceFromParsedURI((*ParsedURI)(u)) return } return }