lint: reenable revive unused-parameter check

Signed-off-by: Matt Souza <medsouz99@gmail.com>
This commit is contained in:
Matt Souza
2025-09-28 19:29:42 -04:00
parent 3747e3db3f
commit 090304a054
263 changed files with 723 additions and 724 deletions

View File

@@ -8,7 +8,7 @@ import (
"github.com/containers/podman/v5/pkg/domain/entities/types"
)
func Inspect(ctx context.Context, nameOrID string, options *InspectOptions) (*types.ArtifactInspectReport, error) {
func Inspect(ctx context.Context, nameOrID string, _ *InspectOptions) (*types.ArtifactInspectReport, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err

View File

@@ -9,7 +9,7 @@ import (
)
// List returns a list of artifacts in local storage.
func List(ctx context.Context, options *ListOptions) ([]*entities.ArtifactListReport, error) {
func List(ctx context.Context, _ *ListOptions) ([]*entities.ArtifactListReport, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return nil, err

View File

@@ -297,7 +297,7 @@ func sshClient(_url *url.URL, uri string, identity string, machine bool) (Connec
val := strings.TrimSuffix(b.String(), "\n")
_url.Path = val
}
dialContext := func(ctx context.Context, _, _ string) (net.Conn, error) {
dialContext := func(_ context.Context, _, _ string) (net.Conn, error) {
return ssh.DialNet(conn, "unix", _url)
}
connection.Client = &http.Client{
@@ -312,7 +312,7 @@ func tcpClient(_url *url.URL, tlsCertFile, tlsKeyFile, tlsCAFile string) (Connec
connection := Connection{
URI: _url,
}
dialContext := func(ctx context.Context, _, _ string) (net.Conn, error) {
dialContext := func(_ context.Context, _, _ string) (net.Conn, error) {
return net.Dial("tcp", _url.Host)
}
// use proxy if env `CONTAINER_PROXY` set
@@ -325,7 +325,7 @@ func tcpClient(_url *url.URL, tlsCertFile, tlsKeyFile, tlsCAFile string) (Connec
if err != nil {
return connection, fmt.Errorf("unable to dial to proxy %s, %w", proxyURI, err)
}
dialContext = func(ctx context.Context, _, _ string) (net.Conn, error) {
dialContext = func(_ context.Context, _, _ string) (net.Conn, error) {
logrus.Debugf("use proxy %s, but proxy dialer does not support dial timeout", proxyURI)
return proxyDialer.Dial("tcp", _url.Host)
}

View File

@@ -15,10 +15,10 @@ func makeRawTerm(stdin *os.File) (*term.State, error) {
return term.MakeRaw(int(stdin.Fd()))
}
func notifyWinChange(ctx context.Context, winChange chan os.Signal, stdin *os.File, stdout *os.File) {
func notifyWinChange(_ context.Context, winChange chan os.Signal, _ *os.File, _ *os.File) {
signal.Notify(winChange, sig.SIGWINCH)
}
func getTermSize(stdin *os.File, stdout *os.File) (width, height int, err error) {
func getTermSize(stdin *os.File, _ *os.File) (width, height int, err error) {
return term.GetSize(int(stdin.Fd()))
}

View File

@@ -34,7 +34,7 @@ func makeRawTerm(stdin *os.File) (*term.State, error) {
return state, nil
}
func notifyWinChange(ctx context.Context, winChange chan os.Signal, stdin *os.File, stdout *os.File) {
func notifyWinChange(ctx context.Context, winChange chan os.Signal, _ *os.File, stdout *os.File) {
// Simulate WINCH with polling
go func() {
var lastW int
@@ -62,6 +62,6 @@ func notifyWinChange(ctx context.Context, winChange chan os.Signal, stdin *os.Fi
}()
}
func getTermSize(stdin *os.File, stdout *os.File) (width, height int, err error) {
func getTermSize(_ *os.File, stdout *os.File) (width, height int, err error) {
return term.GetSize(int(stdout.Fd()))
}

View File

@@ -4,6 +4,6 @@ import (
"os"
)
func checkHardLink(fi os.FileInfo) (devino, bool) {
func checkHardLink(_ os.FileInfo) (devino, bool) {
return devino{}, false
}

View File

@@ -19,7 +19,7 @@ import (
// Exists a lightweight way to determine if an image exists in local storage. It returns a
// boolean response.
func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error) {
func Exists(ctx context.Context, nameOrID string, _ *ExistsOptions) (bool, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return false, err
@@ -326,7 +326,7 @@ func Search(ctx context.Context, term string, options *SearchOptions) ([]types.I
return results, nil
}
func Scp(ctx context.Context, source, destination *string, options ScpOptions) (reports.ScpReport, error) {
func Scp(ctx context.Context, source, _ *string, options ScpOptions) (reports.ScpReport, error) {
rep := reports.ScpReport{}
conn, err := bindings.GetClient(ctx)

View File

@@ -62,7 +62,7 @@ func Create(ctx context.Context, name string, images []string, options *CreateOp
}
// Exists returns true if a given manifest list exists
func Exists(ctx context.Context, name string, options *ExistsOptions) (bool, error) {
func Exists(ctx context.Context, name string, _ *ExistsOptions) (bool, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return false, err

View File

@@ -197,7 +197,7 @@ func Connect(ctx context.Context, networkName string, containerNameOrID string,
}
// Exists returns true if a given network exists
func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error) {
func Exists(ctx context.Context, nameOrID string, _ *ExistsOptions) (bool, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return false, err

View File

@@ -37,7 +37,7 @@ func CreatePodFromSpec(ctx context.Context, spec *entitiesTypes.PodSpec) (*entit
}
// Exists is a lightweight method to determine if a pod exists in local storage
func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error) {
func Exists(ctx context.Context, nameOrID string, _ *ExistsOptions) (bool, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return false, err

View File

@@ -128,7 +128,7 @@ func Remove(ctx context.Context, nameOrID string, options *RemoveOptions) error
}
// Exists returns true if a given volume exists
func Exists(ctx context.Context, nameOrID string, options *ExistsOptions) (bool, error) {
func Exists(ctx context.Context, nameOrID string, _ *ExistsOptions) (bool, error) {
conn, err := bindings.GetClient(ctx)
if err != nil {
return false, err