refactor: run Go modernize (#5002)
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user