You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/koind/double-linked-list

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/koind/double-linked-list

v0.0.0-20190622194044-f4c902ca38ef
Source
Go
Version published
Created
Source

double-linked-list

Implement the doubly linked list on Go.

Installation

Run the following command from you terminal:

go get github.com/koind/double-linked-list

Usage

Package usage example.

package main

import (
	"fmt"
	"github.com/koind/double-linked-list"
)

func main() {
	list := double_linked_list.NewList()
	
	list.PushFront(1)
	list.PushFront(2)
	list.PushFront(3)
	
	item := list.Last()
	fmt.Println(item.Value()) // 3
}

Available Methods

The following methods are available:

koind/double-linked-list
NewList() *List
Len() int
First() *Item
Last() *Item
PushFront(v interface{})
PushBack(v interface{})
Remove(v interface{}) bool
Value() interface{}
Next() *Item
Prev() *Item

Tests

Run the following command from you terminal:

go test -v .

FAQs

Package last updated on 22 Jun 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.