From ae79db38da1e67bb6dee974fa99ae920b6b9bf04 Mon Sep 17 00:00:00 2001 From: Gokcehan Date: Sat, 26 Dec 2020 21:14:06 +0300 Subject: [PATCH] cleanup --- colors.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/colors.go b/colors.go index 1937228..8370bb7 100644 --- a/colors.go +++ b/colors.go @@ -217,30 +217,30 @@ func parseStylesBSD(env string) styleMap { return styles } -func (cm styleMap) get(f *file) tcell.Style { - if val, ok := cm[f.path]; ok { +func (sm styleMap) get(f *file) tcell.Style { + if val, ok := sm[f.path]; ok { return val } if f.IsDir() { - if val, ok := cm[f.Name()+"/"]; ok { + if val, ok := sm[f.Name()+"/"]; ok { return val } } - if val, ok := cm[f.Name()]; ok { + if val, ok := sm[f.Name()]; ok { return val } - if val, ok := cm[f.Name()]; ok { + if val, ok := sm[f.Name()]; ok { return val } - if val, ok := cm[filepath.Base(f.Name())+".*"]; ok { + if val, ok := sm[filepath.Base(f.Name())+".*"]; ok { return val } - if val, ok := cm["*"+f.ext]; ok { + if val, ok := sm["*"+f.ext]; ok { return val } @@ -277,7 +277,7 @@ func (cm styleMap) get(f *file) tcell.Style { key = "fi" } - if val, ok := cm[key]; ok { + if val, ok := sm[key]; ok { return val }