1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Delete unused function

This commit is contained in:
Chris Cummer 2018-06-24 07:52:42 -07:00
parent 2fec736935
commit 1b32dd8277
2 changed files with 3 additions and 19 deletions

View File

@ -133,22 +133,6 @@ func LoadConfigFile(filePath string) *config.Config {
return cfg
}
func ReadConfigFile(fileName string) (string, error) {
configDir, err := ConfigDir()
if err != nil {
return "", err
}
filePath := fmt.Sprintf("%s/%s", configDir, fileName)
fileData, err := wtf.ReadFileBytes(filePath)
if err != nil {
return "", err
}
return string(fileData), nil
}
const simpleConfig = `wtf:
colors:
border:

View File

@ -4,7 +4,7 @@ import (
"github.com/gdamore/tcell"
)
var Colors = map[string]tcell.Color{
var colors = map[string]tcell.Color{
"aliceblue": tcell.ColorAliceBlue,
"antiquewhite": tcell.ColorAntiqueWhite,
"aqua": tcell.ColorAqua,
@ -148,8 +148,8 @@ var Colors = map[string]tcell.Color{
}
func ColorFor(label string) tcell.Color {
if _, ok := Colors[label]; ok {
return Colors[label]
if _, ok := colors[label]; ok {
return colors[label]
} else {
return tcell.ColorGreen
}