amend
This commit is contained in:
parent
bd0bb96234
commit
ee8f40814e
|
@ -82,11 +82,20 @@ func NewStyles() *Styles {
|
|||
return l
|
||||
}
|
||||
|
||||
func (s *Styles) HasStyle(name string) bool {
|
||||
var done bool = false
|
||||
for key := range s.List {
|
||||
if done = key == name; done {
|
||||
break
|
||||
}
|
||||
}
|
||||
return done
|
||||
}
|
||||
|
||||
func (s *Styles) Get(name string) *Style {
|
||||
var style *Style
|
||||
var ok bool = false
|
||||
if style, ok = s.List[name]; !ok {
|
||||
style = defStyle
|
||||
style := defStyle
|
||||
if s.HasStyle(name) {
|
||||
style = s.List[name]
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user