github.com/searKing/golang/go@v1.2.74/container/slice/empty.go (about)

     1  // Copyright 2020 The searKing Author. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package slice
     6  
     7  // EmptyFunc returns an empty sequential {@code slice}.
     8  func EmptyFunc(s interface{}) interface{} {
     9  	return normalizeSlice(emptyFunc(), s)
    10  }
    11  
    12  // emptyFunc is the same as EmptyFunc
    13  func emptyFunc() []interface{} {
    14  	return []interface{}{}
    15  }