Skip to content
Snippets Groups Projects
Commit 4611bdd1 authored by AlexStocks's avatar AlexStocks
Browse files

Mod: just use len to check nil array

parent 157ee3ef
No related branches found
No related tags found
No related merge requests found
......@@ -203,10 +203,6 @@ func (s *serviceArray) String() string {
}
func (s *serviceArray) Select(ID int64, mode Mode, ttl time.Duration) (*ServiceURL, error) {
if s.arr == nil {
return nil, ErrServiceArrayEmpty
}
arrSize := len(s.arr)
if arrSize == 0 {
return nil, ErrServiceArrayEmpty
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment