version bump + move some filecontents.go logic to format.go

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
This commit is contained in:
kim (grufwub) 2020-05-02 22:46:58 +01:00
parent 41d6f279fc
commit d089c8a932
3 changed files with 14 additions and 9 deletions

View File

@ -2,7 +2,7 @@ package main
const (
/* Gophor */
GophorVersion = "0.6-beta-PR1"
GophorVersion = "0.6-beta-PR2"
/* Socket settings */
SocketReadBufSize = 256 /* Supplied selector shouldn't be longer than this anyways */

View File

@ -3,7 +3,6 @@ package main
import (
"bytes"
"bufio"
"strings"
)
/* GeneratedFileContents:
@ -278,7 +277,7 @@ func readIntoGophermap(path string) ([]byte, *GophorError) {
}
/* Replace the newline character */
line = strings.Replace(line, "\n", "", -1)
line = replaceNewLines(line)
/* Iterate through returned str, reflowing to new line
* until all lines < PageWidth
@ -313,9 +312,3 @@ func minWidth(w int) int {
return Config.PageWidth
}
}
func replaceStrings(str string, connHost *ConnHost) []byte {
str = strings.Replace(str, ReplaceStrHostname, connHost.Name, -1)
str = strings.Replace(str, ReplaceStrPort, connHost.Port, -1)
return []byte(str)
}

View File

@ -210,3 +210,15 @@ func parseLineType(line string) ItemType {
return ItemType(line[0])
}
/* Replace standard replacement strings */
func replaceStrings(str string, connHost *ConnHost) []byte {
str = strings.Replace(str, ReplaceStrHostname, connHost.Name, -1)
str = strings.Replace(str, ReplaceStrPort, connHost.Port, -1)
return []byte(str)
}
/* Replace new-line characters */
func replaceNewLines(str string) string {
return strings.Replace(str, "\n", "", -1)
}