github.com/searKing/golang/go@v1.2.74/container/slice/toslice.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  // ToSliceFunc returns an array containing the elements of this stream.
     8  func ToSliceFunc(s interface{}) interface{} {
     9  	return toSliceFunc(Of(s))
    10  }
    11  
    12  // toSliceFunc is the same as ToSliceFunc
    13  func toSliceFunc(s []interface{}) []interface{} {
    14  	return s
    15  }