From e30a1b0768d35ec70e5d2c00e6ae87c0f267b881 Mon Sep 17 00:00:00 2001 From: xegineering Date: Fri, 8 Nov 2024 20:35:24 +0100 Subject: Rename cmd to args This variable only contains the arguments for the called program. Thus it should be named like this. --- soundbox/stream.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/soundbox/stream.go b/soundbox/stream.go index cc8fcea..4b08840 100644 --- a/soundbox/stream.go +++ b/soundbox/stream.go @@ -20,7 +20,7 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd return err } - cmd := []string{ + args := []string{ "-re", "-i", url, @@ -32,11 +32,11 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd return err } - cmd = append(cmd, "-acodec") - cmd = append(cmd, "flac") - cmd = append(cmd, "-f") - cmd = append(cmd, "ogg") - cmd = append(cmd, fmt.Sprintf( + args = append(args, "-acodec") + args = append(args, "flac") + args = append(args, "-f") + args = append(args, "ogg") + args = append(args, fmt.Sprintf( "tcp://[%s%%%s]:%d", ip, iface.Name, @@ -44,5 +44,5 @@ func StreamURLContext(ctx context.Context, url string, targets []net.HardwareAdd )) } - return exec.CommandContext(ctx, "ffmpeg", cmd...).Run() + return exec.CommandContext(ctx, "ffmpeg", args...).Run() } -- cgit v1.2.3-70-g09d2