From 7d1780889a7701abb660d0bd93e9b870cf0aa373 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 17 Jan 2021 19:40:56 +0300 Subject: [PATCH] Remove unnecessary len() --- src/toss.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/toss.go b/src/toss.go index 682c461..75e01c4 100644 --- a/src/toss.go +++ b/src/toss.go @@ -155,7 +155,7 @@ func (ctx *Ctx) Toss( if !dryRun { cmd := exec.Command( cmdline[0], - append(cmdline[1:len(cmdline)], args...)..., + append(cmdline[1:], args...)..., ) cmd.Env = append( cmd.Env, @@ -182,7 +182,7 @@ func (ctx *Ctx) Toss( if exists { cmd := exec.Command( sendmail[0], - append(sendmail[1:len(sendmail)], notify.To)..., + append(sendmail[1:], notify.To)..., ) cmd.Stdin = newNotification(notify, fmt.Sprintf( "Exec from %s: %s", sender.Name, argsStr, @@ -303,7 +303,7 @@ func (ctx *Ctx) Toss( if len(sendmail) > 0 && ctx.NotifyFile != nil { cmd := exec.Command( sendmail[0], - append(sendmail[1:len(sendmail)], ctx.NotifyFile.To)..., + append(sendmail[1:], ctx.NotifyFile.To)..., ) cmd.Stdin = newNotification(ctx.NotifyFile, fmt.Sprintf( "File from %s: %s (%s)", @@ -372,7 +372,7 @@ func (ctx *Ctx) Toss( if len(sendmail) > 0 && ctx.NotifyFreq != nil { cmd := exec.Command( sendmail[0], - append(sendmail[1:len(sendmail)], ctx.NotifyFreq.To)..., + append(sendmail[1:], ctx.NotifyFreq.To)..., ) cmd.Stdin = newNotification(ctx.NotifyFreq, fmt.Sprintf( "Freq from %s: %s", sender.Name, src, -- 2.44.0