mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-21 13:23:09 +01:00
Fix linter
Updates golangci-lint and updates to the correct config format. Also renames some unused parameters to `_` to appese `revive`.
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
func (c *Client) ImageList(ctx context.Context, request *pb.ImageListRequest) (*pb.ImageListResponse, error) {
|
||||
func (c *Client) ImageList(_ context.Context, _ *pb.ImageListRequest) (*pb.ImageListResponse, error) {
|
||||
images, err := c.db.ListImage()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -46,7 +46,7 @@ func (c *Client) ImageList(ctx context.Context, request *pb.ImageListRequest) (*
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Client) ImageInspect(ctx context.Context, request *pb.ImageInspectRequest) (*pb.ImageInspectResponse, error) {
|
||||
func (c *Client) ImageInspect(_ context.Context, request *pb.ImageInspectRequest) (*pb.ImageInspectResponse, error) {
|
||||
ref, err := reference.ParseNormalizedNamed(request.Name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -81,7 +81,7 @@ func (c *Client) ImageInspect(ctx context.Context, request *pb.ImageInspectReque
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Client) ImageRemove(ctx context.Context, request *pb.ImageRemoveRequest) (*pb.ImageRemoveResponse, error) {
|
||||
func (c *Client) ImageRemove(_ context.Context, request *pb.ImageRemoveRequest) (*pb.ImageRemoveResponse, error) {
|
||||
ref, err := reference.ParseNormalizedNamed(request.Name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -125,7 +125,7 @@ func (c *Client) ImageRemove(ctx context.Context, request *pb.ImageRemoveRequest
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (c *Client) ImagePrune(ctx context.Context, request *pb.ImagePruneRequest) (*pb.ImagePruneResponse, error) {
|
||||
func (c *Client) ImagePrune(_ context.Context, _ *pb.ImagePruneRequest) (*pb.ImagePruneResponse, error) {
|
||||
images, err := c.db.ListImage()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/crazy-max/diun/v4/pkg/registry"
|
||||
)
|
||||
|
||||
func (c *Client) NotifTest(ctx context.Context, request *pb.NotifTestRequest) (*pb.NotifTestResponse, error) {
|
||||
func (c *Client) NotifTest(_ context.Context, _ *pb.NotifTestRequest) (*pb.NotifTestResponse, error) {
|
||||
createdAt, _ := time.Parse("2006-01-02T15:04:05Z", "2020-03-26T12:23:56Z")
|
||||
image, _ := registry.ParseImage(registry.ParseImageOptions{
|
||||
Name: "diun/testnotif:latest",
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/crazy-max/diun/v4/internal/notif/notifier"
|
||||
"github.com/crazy-max/diun/v4/pkg/utl"
|
||||
"github.com/go-gomail/gomail"
|
||||
"github.com/matcornic/hermes/v2"
|
||||
hermes "github.com/matcornic/hermes/v2"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
@@ -7,5 +7,5 @@ import (
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
func setSysProcAttr(cmd *exec.Cmd) {
|
||||
func setSysProcAttr(_ *exec.Cmd) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user