Golang - Demonstrate the use ring.Len() function Code Example

The code for Demonstrate the use ring.Len() function

package main 

import ( 
    "container/ring"
    "fmt"
) 

func main() { 
    // A new ring of size 3
    rng := ring.New(3) 
  
    // Printing its length 
    fmt.Println(rng.Len()) 
  
} 

/*
Output:
3
*/
Code by IncludeHelp, on February 28, 2023 16:25

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.