From 331c43ebb5c16a03f63b0b41188f8c3e30b8d0eb Mon Sep 17 00:00:00 2001 From: Andy Kluger Date: Wed, 3 Dec 2025 15:10:36 -0500 Subject: [PATCH] Replace never-assigned var filename with literal empty strings --- cmd/micro/micro.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/micro/micro.go b/cmd/micro/micro.go index 8631fe5d..bf4d088f 100644 --- a/cmd/micro/micro.go +++ b/cmd/micro/micro.go @@ -158,7 +158,6 @@ func LoadInput(args []string) []*buffer.Buffer { // 3. If there is no input file and the input is a terminal, an empty buffer // should be opened - var filename string buffers := make([]*buffer.Buffer, 0, len(args)) files := make([]string, 0, len(args)) @@ -238,10 +237,10 @@ func LoadInput(args []string) []*buffer.Buffer { screen.TermMessage("Error reading from stdin: ", err) input = []byte{} } - buffers = append(buffers, buffer.NewBufferFromStringWithCommand(string(input), filename, btype, command)) + buffers = append(buffers, buffer.NewBufferFromStringWithCommand(string(input), "", btype, command)) } else { // Option 3, just open an empty buffer - buffers = append(buffers, buffer.NewBufferFromStringWithCommand("", filename, btype, command)) + buffers = append(buffers, buffer.NewBufferFromStringWithCommand("", "", btype, command)) } }