all: enable use-any revive rule (#417)
Enable the `use-any` `revive` rule which requires replacing the empty
interface `interface{}` with `any`.
This commit is contained in:
committed by
GitHub
parent
d84f103398
commit
11e0a2138b
@@ -71,7 +71,7 @@ func mainerr() (err error) {
|
||||
}
|
||||
|
||||
// Execute.
|
||||
data := map[string]interface{}{
|
||||
data := map[string]any{
|
||||
"Suite": suite,
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ func (c *Client) Issue(ctx context.Context, owner, name string, number int) (*Is
|
||||
return issue, nil
|
||||
}
|
||||
|
||||
func (c *Client) request(req *http.Request, payload interface{}) (err error) {
|
||||
func (c *Client) request(req *http.Request, payload any) (err error) {
|
||||
// Add common headers.
|
||||
if c.token != "" {
|
||||
req.Header.Set("Authorization", "Bearer "+c.token)
|
||||
|
||||
@@ -43,13 +43,13 @@ func (g *Generator) Dedent() {
|
||||
}
|
||||
|
||||
// Linef prints formatted output terminated with a new line.
|
||||
func (g *Generator) Linef(format string, args ...interface{}) {
|
||||
func (g *Generator) Linef(format string, args ...any) {
|
||||
g.Printf(format, args...)
|
||||
g.NL()
|
||||
}
|
||||
|
||||
// Printf prints to the internal buffer.
|
||||
func (g *Generator) Printf(format string, args ...interface{}) {
|
||||
func (g *Generator) Printf(format string, args ...any) {
|
||||
if g.err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user