Fix go vet
This commit is contained in:
parent
912bf309d1
commit
2fc3378b71
4
Gopkg.lock
generated
4
Gopkg.lock
generated
@ -164,14 +164,14 @@
|
|||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:f0a9c6bdcbf2bbaa02f4f913b1956cc722daf92bec1715b51e001e53ba93b3a2"
|
digest = "1:1abef70ba640c92bf2763f1b1fbcb8c6e3ba1b58b2dcfeb933a09bfc51f7147b"
|
||||||
name = "maunium.net/go/mautrix"
|
name = "maunium.net/go/mautrix"
|
||||||
packages = [
|
packages = [
|
||||||
".",
|
".",
|
||||||
"format",
|
"format",
|
||||||
]
|
]
|
||||||
pruneopts = "UT"
|
pruneopts = "UT"
|
||||||
revision = "5012a3c49b63ccb3c72cd01d2fd3442759c3ea3c"
|
revision = "ffb03045581b402abaa1fd51340207dfb807dc81"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
|
9
vendor/maunium.net/go/mautrix/events.go
generated
vendored
9
vendor/maunium.net/go/mautrix/events.go
generated
vendored
@ -197,7 +197,7 @@ type Content struct {
|
|||||||
RelatesTo *RelatesTo `json:"m.relates_to,omitempty"`
|
RelatesTo *RelatesTo `json:"m.relates_to,omitempty"`
|
||||||
Command *MatchedCommand `json:"m.command,omitempty"`
|
Command *MatchedCommand `json:"m.command,omitempty"`
|
||||||
|
|
||||||
PowerLevels
|
*PowerLevels
|
||||||
Member
|
Member
|
||||||
Aliases []string `json:"aliases,omitempty"`
|
Aliases []string `json:"aliases,omitempty"`
|
||||||
Alias string `json:"alias,omitempty"`
|
Alias string `json:"alias,omitempty"`
|
||||||
@ -234,6 +234,13 @@ func (content *Content) GetRelatesTo() *RelatesTo {
|
|||||||
return content.RelatesTo
|
return content.RelatesTo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (content *Content) GetPowerLevels() *PowerLevels {
|
||||||
|
if content.PowerLevels == nil {
|
||||||
|
content.PowerLevels = &PowerLevels{}
|
||||||
|
}
|
||||||
|
return content.PowerLevels
|
||||||
|
}
|
||||||
|
|
||||||
func (content *Content) UnmarshalPowerLevels() (pl PowerLevels, err error) {
|
func (content *Content) UnmarshalPowerLevels() (pl PowerLevels, err error) {
|
||||||
err = json.Unmarshal(content.VeryRaw, &pl)
|
err = json.Unmarshal(content.VeryRaw, &pl)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user