Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/robinus2/golang-sortable-map

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/robinus2/golang-sortable-map

  • v0.0.0-20190626075835-e9627969fa54
  • Source
  • Go
  • Socket score

Version published
Created
Source

golang-sortable-map Build Status

Map which can be iterated over in a sorted stable fashion

Usage

import "github.com/RobinUS2/golang-sortable-map"
iterator := sortablemap.IteratorFromMap(map[int64]float64{
    1: 2.0,
    4: 5.0,
    2: 3.0,
    0: 3.0,
})
for iterator.Next() {
    k, v := iterator.Value()
    fmt.Printf("%d %f\n", k.Int64(), v.Float64())
}

// outputs:
// 0 3.000000
// 1 2.000000
// 2 3.000000
// 4 5.000000

Type support

Supported types right now are:

key \ valuefloat64boolinterface{}int64uint64
float64YYYYY
int64YYYYY
uint64YYYYY
stringYYYYY

FAQs

Package last updated on 26 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc