refactor: run Go modernize (#5002)

This commit is contained in:
Maximilian
2026-02-08 08:57:30 -06:00
committed by GitHub
parent 408aa78ed5
commit a704e86ac1
102 changed files with 322 additions and 352 deletions
+1 -1
View File
@@ -459,7 +459,7 @@ type PlayQueueByIndex struct {
}
type Bookmark struct {
Entry Child `xml:"entry,omitempty" json:"entry,omitempty"`
Entry Child `xml:"entry,omitempty" json:"entry"`
Position int64 `xml:"position,attr,omitempty" json:"position,omitempty"`
Username string `xml:"username,attr" json:"username"`
Comment string `xml:"comment,attr" json:"comment"`
@@ -26,17 +26,17 @@ type snapshotMatcher struct {
c *cupaloy.Config
}
func (matcher snapshotMatcher) Match(actual interface{}) (success bool, err error) {
func (matcher snapshotMatcher) Match(actual any) (success bool, err error) {
actualJson := strings.TrimSpace(string(actual.([]byte)))
err = matcher.c.SnapshotWithName(ginkgo.CurrentSpecReport().FullText(), actualJson)
success = err == nil
return
}
func (matcher snapshotMatcher) FailureMessage(_ interface{}) (message string) {
func (matcher snapshotMatcher) FailureMessage(_ any) (message string) {
return "Expected to match saved snapshot\n"
}
func (matcher snapshotMatcher) NegatedFailureMessage(_ interface{}) (message string) {
func (matcher snapshotMatcher) NegatedFailureMessage(_ any) (message string) {
return "Expected to not match saved snapshot\n"
}