formeta

package
v0.1.330 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package formeta implements marshaling for formeta (metafacture internal format).

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrValueNotAllowed signal formeta semantic mismatch.
	ErrValueNotAllowed = errors.New("value not allowed")
)

Functions

func Marshal

func Marshal(v interface{}) ([]byte, error)

Marshal serializes a value as metafacture formeta. Mostly complete, might missing some edge cases. Example formeta snippets:

person-1 {
    Name: Grimm,
    Vorname: Wilhelm,
    Vorname: Carl
}
person-2 {
    Name: Grimm,
    Vorname: Jacob,
}
person-3 {
    surname: 'Jung',
    forename: 'Carl', forename: 'Gustav',
    affiliation {
        institution: 'Basel University',
        country: 'Switzerland',
    },
}
978-3-525-20764-2 {
    title: Kinder- und Hausmärchen,
    authoredById: person-1,
    authoredById: person-2,
    readById: person-3,
    publicationYear: 1986,
    publisher: Vandenhoeck und Ruprecht\: Göttingen,
    isbn: 978-3-525-20764-2
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL