mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 09:57:01 +00:00
Remove redundant nil check (#2194)
From the Go docs: "If the map is nil, the number of iterations is 0." [1] Therefore, an additional nil check for before the loop is unnecessary. [1]: https://go.dev/ref/spec#For_range Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -282,10 +282,8 @@ func (s *JetEngine) initSet() {
|
||||
}
|
||||
|
||||
s.Set = jet.NewSet(s.loader, opts...)
|
||||
if s.vars != nil {
|
||||
for key, value := range s.vars {
|
||||
s.Set.AddGlobal(key, value)
|
||||
}
|
||||
for key, value := range s.vars {
|
||||
s.Set.AddGlobal(key, value)
|
||||
}
|
||||
}
|
||||
s.mu.Unlock()
|
||||
|
||||
Reference in New Issue
Block a user