Skip to content
Snippets Groups Projects
Commit dbc25125 authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

many: replace unused argument with _


Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent c353b965
No related branches found
No related tags found
1 merge request!7many: replace unused argument with _
...@@ -129,7 +129,7 @@ func (cmd setPrimarySlotCmd) OneLiner() string { ...@@ -129,7 +129,7 @@ func (cmd setPrimarySlotCmd) OneLiner() string {
return "set the name of the primary slot" return "set the name of the primary slot"
} }
func (cmd setPrimarySlotCmd) Run(ctx context.Context, args []string) error { func (cmd setPrimarySlotCmd) Run(_ context.Context, args []string) error {
var slot boot.Slot var slot boot.Slot
switch len(args) { switch len(args) {
...@@ -192,7 +192,7 @@ func (cmd setSlotStateCmd) OneLiner() string { ...@@ -192,7 +192,7 @@ func (cmd setSlotStateCmd) OneLiner() string {
return "set the state of a given slot" return "set the state of a given slot"
} }
func (cmd setSlotStateCmd) Run(ctx context.Context, args []string) error { func (cmd setSlotStateCmd) Run(_ context.Context, args []string) error {
var slot boot.Slot var slot boot.Slot
var state boot.SlotState var state boot.SlotState
......
...@@ -61,7 +61,7 @@ func (s *cmdSuite) EnsureConn(c *C) *dbus.Conn { ...@@ -61,7 +61,7 @@ func (s *cmdSuite) EnsureConn(c *C) *dbus.Conn {
return s.conn return s.conn
} }
func (s *cmdSuite) SetUpTest(c *C) { func (s *cmdSuite) SetUpTest(_ *C) {
s.handler.ResetCallbacks() s.handler.ResetCallbacks()
} }
...@@ -178,7 +178,7 @@ type suiteBase struct { ...@@ -178,7 +178,7 @@ type suiteBase struct {
cmd cmdr.Cmd cmd cmdr.Cmd
} }
func (s *suiteBase) SetUpTest(c *C) { func (s *suiteBase) SetUpTest(_ *C) {
s.handler.ResetCallbacks() s.handler.ResetCallbacks()
s.cmd = rauccustomboothandler.InterfaceCmd{&s.handler} s.cmd = rauccustomboothandler.InterfaceCmd{&s.handler}
} }
......
...@@ -32,7 +32,7 @@ func (cmd Cmd) OneLiner() string { ...@@ -32,7 +32,7 @@ func (cmd Cmd) OneLiner() string {
} }
// Run constructs handler context and invokes the post-install method over D-Bus. // Run constructs handler context and invokes the post-install method over D-Bus.
func (cmd Cmd) Run(ctx context.Context, args []string) error { func (cmd Cmd) Run(_ context.Context, _ []string) error {
return installdbus.Do(func(client *installdbus.Client, env *installhandler.Environment) error { return installdbus.Do(func(client *installdbus.Client, env *installhandler.Environment) error {
return client.PostInstall(env) return client.PostInstall(env)
}) })
......
...@@ -34,7 +34,7 @@ type cmdSuite struct { ...@@ -34,7 +34,7 @@ type cmdSuite struct {
var _ = Suite(&cmdSuite{}) var _ = Suite(&cmdSuite{})
func (s *cmdSuite) SetUpTest(c *C) { func (s *cmdSuite) SetUpTest(_ *C) {
s.cmd = raucpostinstallhandler.Cmd{} s.cmd = raucpostinstallhandler.Cmd{}
} }
......
...@@ -32,7 +32,7 @@ func (cmd Cmd) OneLiner() string { ...@@ -32,7 +32,7 @@ func (cmd Cmd) OneLiner() string {
} }
// Run constructs handler context and invokes the pre-install method over D-Bus. // Run constructs handler context and invokes the pre-install method over D-Bus.
func (cmd Cmd) Run(ctx context.Context, args []string) error { func (cmd Cmd) Run(_ context.Context, _ []string) error {
return installdbus.Do(func(client *installdbus.Client, env *installhandler.Environment) error { return installdbus.Do(func(client *installdbus.Client, env *installhandler.Environment) error {
return client.PreInstall(env) return client.PreInstall(env)
}) })
......
...@@ -34,7 +34,7 @@ type cmdSuite struct { ...@@ -34,7 +34,7 @@ type cmdSuite struct {
var _ = Suite(&cmdSuite{}) var _ = Suite(&cmdSuite{})
func (s *cmdSuite) SetUpTest(c *C) { func (s *cmdSuite) SetUpTest(_ *C) {
s.cmd = raucpreinstallhandler.Cmd{} s.cmd = raucpreinstallhandler.Cmd{}
} }
......
...@@ -16,6 +16,6 @@ type mainSuite struct{} ...@@ -16,6 +16,6 @@ type mainSuite struct{}
var _ = Suite(&mainSuite{}) var _ = Suite(&mainSuite{})
func (s *mainSuite) TestMain(c *C) { func (s *mainSuite) TestMain(_ *C) {
main.Main() main.Main()
} }
...@@ -97,7 +97,7 @@ func (s *cmdSuite) TearDownSuite(c *C) { ...@@ -97,7 +97,7 @@ func (s *cmdSuite) TearDownSuite(c *C) {
s.Suite.TearDownSuite(c) s.Suite.TearDownSuite(c)
} }
func (s *cmdSuite) SetUpTest(c *C) { func (s *cmdSuite) SetUpTest(_ *C) {
s.m.Lock() s.m.Lock()
defer s.m.Unlock() defer s.m.Unlock()
......
...@@ -61,7 +61,7 @@ func (s *serviceSuite) EnsureService(c *C) { ...@@ -61,7 +61,7 @@ func (s *serviceSuite) EnsureService(c *C) {
} }
} }
func (s *serviceSuite) SetUpTest(c *C) { func (s *serviceSuite) SetUpTest(_ *C) {
s.config = ota.Config{} s.config = ota.Config{}
s.state = ota.SystemState{} s.state = ota.SystemState{}
} }
......
...@@ -47,7 +47,7 @@ func (Cmd) OneLiner() string { ...@@ -47,7 +47,7 @@ func (Cmd) OneLiner() string {
} }
// Run implements the sysotad binary. // Run implements the sysotad binary.
func (cmd *Cmd) Run(ctx context.Context, args []string) (err error) { func (cmd *Cmd) Run(ctx context.Context, _ []string) (err error) {
_, stdout, _ := cmdr.Stdio(ctx) _, stdout, _ := cmdr.Stdio(ctx)
// Connect to the system bus and defer disconnect on return. // Connect to the system bus and defer disconnect on return.
......
...@@ -35,7 +35,7 @@ type clientSuite struct { ...@@ -35,7 +35,7 @@ type clientSuite struct {
var _ = Suite(&clientSuite{}) var _ = Suite(&clientSuite{})
func (s *clientSuite) SetUpTest(c *C) { func (s *clientSuite) SetUpTest(_ *C) {
s.handler.ResetCallbacks() s.handler.ResetCallbacks()
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment