4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-08 06:44:04 +00:00

Update vendor yaegashi/msgraph.go to v0.1.2 (2)

This commit is contained in:
Qais Patankar
2020-03-15 22:43:46 +00:00
committed by Wim
parent 802c80f40c
commit 76e5fe5a87
4255 changed files with 191113 additions and 196894 deletions

32
vendor/github.com/rickb777/date/period/marshal.go generated vendored Normal file
View File

@ -0,0 +1,32 @@
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package period
// MarshalBinary implements the encoding.BinaryMarshaler interface.
// This also provides support for gob encoding.
func (period Period) MarshalBinary() ([]byte, error) {
// binary method would take more space in many cases, so we simply use text
return period.MarshalText()
}
// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
// This also provides support for gob encoding.
func (period *Period) UnmarshalBinary(data []byte) error {
return period.UnmarshalText(data)
}
// MarshalText implements the encoding.TextMarshaler interface for Periods.
func (period Period) MarshalText() ([]byte, error) {
return []byte(period.String()), nil
}
// UnmarshalText implements the encoding.TextUnmarshaler interface for Periods.
func (period *Period) UnmarshalText(data []byte) (err error) {
u, err := Parse(string(data))
if err == nil {
*period = u
}
return err
}