util

package
v0.0.0-...-b5151e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexN

func IndexN(s []byte, sep []byte, n int) int

Find the nth index of the separator. Returns the beginning of the nth separator. Returns -1 if the nth separator was not found.

func Println

func Println(conn net.Conn, tag string, msg interface{})

Types

type CircularBuffer

type CircularBuffer struct {
	Ring *ring.Ring
	// contains filtered or unexported fields
}

func NewCircularBuffer

func NewCircularBuffer(size int) *CircularBuffer

func (*CircularBuffer) Add

func (buf *CircularBuffer) Add(value interface{})

func (*CircularBuffer) Current

func (buf *CircularBuffer) Current() interface{}

func (*CircularBuffer) Len

func (buf *CircularBuffer) Len() int

Buffer size.

func (*CircularBuffer) Remove

func (buf *CircularBuffer) Remove() interface{}

func (*CircularBuffer) Size

func (buf *CircularBuffer) Size() int

Number of items added.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL