From e56b21b8199a2b58b96a4c183538586d1d4d939b Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 14 Oct 2020 19:02:03 +0200 Subject: [PATCH] Do not export ASCII chars --- stream/telnet/telnet.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stream/telnet/telnet.go b/stream/telnet/telnet.go index 2a125f8..aac5bbb 100644 --- a/stream/telnet/telnet.go +++ b/stream/telnet/telnet.go @@ -16,7 +16,7 @@ var ( currentMessage map[string]*string clientCount map[string]int - ASCIICHARS = []byte{' ', '.', ',', ':', ';', '+', '*', '?', '%', '$', '#', '@'} + asciiChars = []byte{' ', '.', ',', ':', ';', '+', '*', '?', '%', '$', '#', '@'} ) // Options holds telnet package configuration @@ -161,8 +161,8 @@ func StartASCIIArtStream(streamID string, reader io.ReadCloser) { // Convert image to ASCII for j := 0; j < Cfg.Height; j++ { for i := 0; i < Cfg.Width; i++ { - textBuff.WriteByte(ASCIICHARS[pixelBuff[Cfg.Width*j+i]/22]) - textBuff.WriteByte(ASCIICHARS[pixelBuff[Cfg.Width*j+i]/22]) + textBuff.WriteByte(asciiChars[pixelBuff[Cfg.Width*j+i]/22]) + textBuff.WriteByte(asciiChars[pixelBuff[Cfg.Width*j+i]/22]) } textBuff.WriteByte('\n') }