Use constant for empty Term value
This commit is contained in:
parent
b4ab90daff
commit
c76d5dd269
2 changed files with 3 additions and 1 deletions
|
@ -98,6 +98,8 @@ var keywords = Terms{
|
|||
VocabKw,
|
||||
}
|
||||
|
||||
const NullTerm Term = "-"
|
||||
|
||||
type ContextObject struct {
|
||||
ID interface{} `jsonld:"@id,omitempty,collapsible"`
|
||||
Type interface{} `jsonld:"@type,omitempty,collapsible"`
|
||||
|
|
|
@ -21,7 +21,7 @@ func TestRef_MarshalText(t *testing.T) {
|
|||
|
||||
func TestContext_MarshalJSON(t *testing.T) {
|
||||
url := "test"
|
||||
c := Context{"_": IRI(url)}
|
||||
c := Context{NullTerm: IRI(url)}
|
||||
//c.Language = "en-GB"
|
||||
|
||||
out, err := c.MarshalJSON()
|
||||
|
|
Reference in a new issue