Skip to content

Commit 331c43e

Browse files
committed
Replace never-assigned var filename with literal empty strings
1 parent 70d9b64 commit 331c43e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/micro/micro.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ func LoadInput(args []string) []*buffer.Buffer {
158158
// 3. If there is no input file and the input is a terminal, an empty buffer
159159
// should be opened
160160

161-
var filename string
162161
buffers := make([]*buffer.Buffer, 0, len(args))
163162

164163
files := make([]string, 0, len(args))
@@ -238,10 +237,10 @@ func LoadInput(args []string) []*buffer.Buffer {
238237
screen.TermMessage("Error reading from stdin: ", err)
239238
input = []byte{}
240239
}
241-
buffers = append(buffers, buffer.NewBufferFromStringWithCommand(string(input), filename, btype, command))
240+
buffers = append(buffers, buffer.NewBufferFromStringWithCommand(string(input), "", btype, command))
242241
} else {
243242
// Option 3, just open an empty buffer
244-
buffers = append(buffers, buffer.NewBufferFromStringWithCommand("", filename, btype, command))
243+
buffers = append(buffers, buffer.NewBufferFromStringWithCommand("", "", btype, command))
245244
}
246245
}
247246

0 commit comments

Comments
 (0)