mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Delete unused function
This commit is contained in:
parent
2fec736935
commit
1b32dd8277
@ -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:
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user