mirror of
https://github.com/containers/podman.git
synced 2025-10-15 02:06:42 +08:00
lint: reenable revive unused-parameter check
Signed-off-by: Matt Souza <medsouz99@gmail.com>
This commit is contained in:
@ -71,6 +71,6 @@ func (p *PodmanTestIntegration) StartRemoteService() {
|
||||
}
|
||||
|
||||
// Just a stub for compiling with `!remote`.
|
||||
func getRemoteOptions(p *PodmanTestIntegration, args []string) []string {
|
||||
func getRemoteOptions(_ *PodmanTestIntegration, _ []string) []string {
|
||||
return nil
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ func pullChunkedTests() { // included in pull_test.go, must use a Ginkgo DSL at
|
||||
// This is, nominally, a built-in feature of Ginkgo, but we run the tests with -vv, making the
|
||||
// full output always captured in a log. So, here, we need to conditionalize explicitly.
|
||||
var lastPullOutput bytes.Buffer
|
||||
ReportAfterEach(func(ctx SpecContext, report SpecReport) {
|
||||
ReportAfterEach(func(_ SpecContext, report SpecReport) {
|
||||
if report.Failed() {
|
||||
AddReportEntry("last pull operation", lastPullOutput.String())
|
||||
}
|
||||
@ -156,7 +156,7 @@ func pullChunkedTests() { // included in pull_test.go, must use a Ginkgo DSL at
|
||||
modified[0] = digest.NewDigestFromEncoded(diffIDs[0].Algorithm(), hex.EncodeToString(digestBytes))
|
||||
return modified
|
||||
})
|
||||
chunkedMissing = createChunkedImage("missing", func(diffIDs []digest.Digest) []digest.Digest {
|
||||
chunkedMissing = createChunkedImage("missing", func(_ []digest.Digest) []digest.Digest {
|
||||
return nil
|
||||
})
|
||||
chunkedEmpty = createChunkedImage("empty", func(diffIDs []digest.Digest) []digest.Digest {
|
||||
|
@ -424,7 +424,7 @@ qe ssh://root@podman.test:2222/run/podman/podman.sock ~/.ssh/id_rsa false true
|
||||
pr.SetURL(baseURL)
|
||||
},
|
||||
Transport: &http.Transport{
|
||||
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) {
|
||||
defer GinkgoRecover()
|
||||
By("Proxying to " + podmanTest.RemoteSocket)
|
||||
url, err := url.Parse(podmanTest.RemoteSocket)
|
||||
|
@ -10,7 +10,7 @@ var createCmd = &cobra.Command{
|
||||
Short: "create a volume",
|
||||
Long: `Create a volume in the volume plugin listening on --sock-name`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
RunE: func(_ *cobra.Command, args []string) error {
|
||||
return createVol(config.sockName, args[0])
|
||||
},
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ var listCmd = &cobra.Command{
|
||||
Short: "list all volumes",
|
||||
Long: `List all volumes from the volume plugin listening on --sock-name`,
|
||||
Args: cobra.NoArgs,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
RunE: func(_ *cobra.Command, _ []string) error {
|
||||
return listVol(config.sockName)
|
||||
},
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ var serveCmd = &cobra.Command{
|
||||
Short: "serve the volume plugin on the unix socket",
|
||||
Long: `Creates simple directory volumes using the Volume Plugin API for testing volume plugin functionality`,
|
||||
Args: cobra.NoArgs,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
RunE: func(_ *cobra.Command, _ []string) error {
|
||||
return startServer(config.sockName)
|
||||
},
|
||||
}
|
||||
@ -52,7 +52,7 @@ func init() {
|
||||
rootCmd.AddCommand(serveCmd, createCmd, removeCmd, listCmd)
|
||||
}
|
||||
|
||||
func before(cmd *cobra.Command, args []string) error {
|
||||
func before(_ *cobra.Command, _ []string) error {
|
||||
if config.logLevel == "" {
|
||||
config.logLevel = "error"
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ var removeCmd = &cobra.Command{
|
||||
Short: "remove a volume",
|
||||
Long: `Remove a volume in the volume plugin listening on --sock-name`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
RunE: func(_ *cobra.Command, args []string) error {
|
||||
return removeVol(config.sockName, args[0])
|
||||
},
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ func FakePodmanTestCreate() *FakePodmanTest {
|
||||
return p
|
||||
}
|
||||
|
||||
func (p *FakePodmanTest) makeOptions(args []string, options PodmanExecOptions) []string {
|
||||
func (p *FakePodmanTest) makeOptions(args []string, _ PodmanExecOptions) []string {
|
||||
return FakeOutputs[strings.Join(args, " ")]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user