Standard library / sort
sort.Float64Slice.Len()
Returns the number of elements in the receiver. Expected stdout: '3\n'.
Formal Syntax & Structure
go syntaxgo
func (x Float64Slice) Len() intReturn Value
int
Returns the number of elements in the receiver.
Working Example
Example Snippetgo
package main
import ( "fmt" "sort")
func main() { a := sort.Float64Slice([]float64{3.5, 1.5, 2.5}) fmt.Println(a.Len())}