Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
github.com/dienakakim/linkedlist
This project contains code implementing a generic doubly linked list in Go. Takes a placeholder element to use as the list's key type, and requires all argument keys to have that type.
func NewLinkedList(key interface{}) LinkedList
NewLinkedList is a factory function creating a new LinkedList with a given element as its keyType.
func (l *LinkedList) InsertBack(key interface{}) (bool, error)
func (l *LinkedList) InsertFront(key interface{}) (bool, error)
func (l *LinkedList) InsertAt(index uint, key interface{}) (bool, error)
Insert methods -- InsertBack inserts at the end of the list, InsertFront inserts at the front, and InsertAt inserts at a given index.
func (l *LinkedList) At(index uint) (interface{}, error)
Retrieves an element at the given index.
func (l *LinkedList) IndexOf(t interface{}) (uint, error)
Finds a given element and returns its index if it is in the list.
func (l *LinkedList) String() string
Returns the list's string representation.
func (l *LinkedList) RemoveBack() (interface{}, error)
func (l *LinkedList) RemoveFront() (interface{}, error)
func (l *LinkedList) RemoveAt(index uint) (interface{}, error)
Remove methods -- same semantics as detailed in insert methods.
func (l *LinkedList) Remove(key interface{}) (bool, error)
Removes a given element from the list if found.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.