Skip to content

Commit

Permalink
Merge pull request #46 from puerco/ns
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Jul 15, 2023
2 parents deefc43 + 831c0c4 commit 5f4bf12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/vex/vex.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const (
errMsgParse = "error"
)

// DefaultNamespace is the URL that will be used to generate new IRIs for generated
// documents and nodes. It is set to the OpenVEX public namespace by default.
var DefaultNamespace = PublicNamespace

// The VEX type represents a VEX document and all of its contained information.
type VEX struct {
Metadata
Expand Down Expand Up @@ -386,7 +390,7 @@ func (vexDoc *VEX) GenerateCanonicalID() (string, error) {
}

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

Expand Down

0 comments on commit 5f4bf12

Please sign in to comment.