redis/internal/customvet/checks/setval/testdata/src/a/a.go

30 lines
386 B
Go
Raw Normal View History

2024-06-20 02:30:37 +03:00
package a
type GoodCmd struct {
val int
}
func (c *GoodCmd) SetVal(val int) {
c.val = val
}
func (c *GoodCmd) Result() (int, error) {
return c.val, nil
}
type BadCmd struct {
val int
}
func (c *BadCmd) Result() (int, error) { // want "\\*a.BadCmd is missing a SetVal method"
return c.val, nil
}
type NotACmd struct {
val int
}
func (c *NotACmd) Val() int {
return c.val
}