mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-05 20:44:04 +00:00
Update dependencies and vendor (#1761)
This commit is contained in:
27
vendor/github.com/mattermost/mattermost-server/v6/model/utils.go
generated
vendored
27
vendor/github.com/mattermost/mattermost-server/v6/model/utils.go
generated
vendored
@ -76,7 +76,12 @@ func (sa StringArray) Equals(input StringArray) bool {
|
||||
|
||||
// Value converts StringArray to database value
|
||||
func (sa StringArray) Value() (driver.Value, error) {
|
||||
return json.Marshal(sa)
|
||||
j, err := json.Marshal(sa)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// non utf8 characters are not supported https://mattermost.atlassian.net/browse/MM-41066
|
||||
return string(j), err
|
||||
}
|
||||
|
||||
// Scan converts database column value to StringArray
|
||||
@ -117,6 +122,16 @@ func (m *StringMap) Scan(value interface{}) error {
|
||||
return errors.New("received value is neither a byte slice nor string")
|
||||
}
|
||||
|
||||
// Value converts StringMap to database value
|
||||
func (m StringMap) Value() (driver.Value, error) {
|
||||
j, err := json.Marshal(m)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// non utf8 characters are not supported https://mattermost.atlassian.net/browse/MM-41066
|
||||
return string(j), err
|
||||
}
|
||||
|
||||
func (si *StringInterface) Scan(value interface{}) error {
|
||||
if value == nil {
|
||||
return nil
|
||||
@ -135,6 +150,16 @@ func (si *StringInterface) Scan(value interface{}) error {
|
||||
return errors.New("received value is neither a byte slice nor string")
|
||||
}
|
||||
|
||||
// Value converts StringInterface to database value
|
||||
func (si StringInterface) Value() (driver.Value, error) {
|
||||
j, err := json.Marshal(si)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// non utf8 characters are not supported https://mattermost.atlassian.net/browse/MM-41066
|
||||
return string(j), err
|
||||
}
|
||||
|
||||
var translateFunc i18n.TranslateFunc
|
||||
var translateFuncOnce sync.Once
|
||||
|
||||
|
Reference in New Issue
Block a user