Documentation
¶
Index ¶
- Constants
- Variables
- type Entry
- type Log
- type Meta
- type Metas
- func (ms Metas) Append(k string, v any) Metas
- func (ms *Metas) AppendTo(k string, v any)
- func (ms Metas) Get(key string) (any, bool)
- func (ms Metas) Map() map[string]any
- func (ms Metas) MarshalJSON() ([]byte, error)
- func (ms Metas) Set(key string, value any) Metas
- func (ms *Metas) UnmarshalJSON(in []byte) error
Constants ¶
View Source
const DateFormat = tools.DateFormat
Variables ¶
View Source
var ErrorMissingDate = errors.New("Missing date")
View Source
var ErrorMissingTitle = errors.New("Missing title")
View Source
var ErrorParsing = errors.New("Parsing Error")
Functions ¶
This section is empty.
Types ¶
type Entry ¶
func (Entry) MarshalJSON ¶
func (Entry) MarshalText ¶
func (*Entry) UnmarshalJSON ¶
func (*Entry) UnmarshalText ¶
type Log ¶
func (*Log) UnmarshalText ¶
type Metas ¶ added in v0.0.3
type Metas []Meta
A slice of Meta
func (Metas) Get ¶ added in v0.0.8
Returns the value of the Meta with the given key, and a bool indicating if it was found
func (Metas) Map ¶ added in v0.0.3
Returns a single map containing all the Meta. Is useful when encoding to JSON
func (Metas) MarshalJSON ¶ added in v0.0.3
Implements json.Marshaler
func (Metas) Set ¶ added in v0.0.9
Set sets the key to the given value. If key is already in the ms, Set updates the value of the found Meta. If key is not in ms, then we append a new Meta and return the modified Metas.
func (*Metas) UnmarshalJSON ¶ added in v0.0.3
Implements json.Unmarshaler
Click to show internal directories.
Click to hide internal directories.