Skip to content

Commit 5f4bf12

Browse files
authored
Merge pull request #46 from puerco/ns
2 parents deefc43 + 831c0c4 commit 5f4bf12

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/vex/vex.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ const (
4848
errMsgParse = "error"
4949
)
5050

51+
// DefaultNamespace is the URL that will be used to generate new IRIs for generated
52+
// documents and nodes. It is set to the OpenVEX public namespace by default.
53+
var DefaultNamespace = PublicNamespace
54+
5155
// The VEX type represents a VEX document and all of its contained information.
5256
type VEX struct {
5357
Metadata
@@ -386,7 +390,7 @@ func (vexDoc *VEX) GenerateCanonicalID() (string, error) {
386390
}
387391

388392
// For common namespaced documents we namespace them into /public
389-
vexDoc.ID = fmt.Sprintf("%s/public/vex-%s", PublicNamespace, cHash)
393+
vexDoc.ID = fmt.Sprintf("%s/public/vex-%s", DefaultNamespace, cHash)
390394
return vexDoc.ID, nil
391395
}
392396

0 commit comments

Comments
 (0)