{"id":36492721,"url":"https://github.com/kelceydamage/collections","last_synced_at":"2026-01-12T01:57:32.020Z","repository":{"id":57552738,"uuid":"125439549","full_name":"kelceydamage/collections","owner":"kelceydamage","description":"Collections is a an overhaul of slices that greatly extends OOTB functionality, saving a ton of code.","archived":false,"fork":false,"pushed_at":"2018-08-22T17:46:23.000Z","size":90,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T14:28:31.568Z","etag":null,"topics":["collections","functionality","go","golang","helpers","manipulating-slices","methods","slices"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/kelceydamage/collections","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kelceydamage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-15T23:53:02.000Z","updated_at":"2018-08-22T17:46:24.000Z","dependencies_parsed_at":"2022-09-26T18:50:51.375Z","dependency_job_id":null,"html_url":"https://github.com/kelceydamage/collections","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kelceydamage/collections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelceydamage%2Fcollections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelceydamage%2Fcollections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelceydamage%2Fcollections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelceydamage%2Fcollections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelceydamage","download_url":"https://codeload.github.com/kelceydamage/collections/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelceydamage%2Fcollections/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collections","functionality","go","golang","helpers","manipulating-slices","methods","slices"],"created_at":"2026-01-12T01:57:31.937Z","updated_at":"2026-01-12T01:57:32.014Z","avatar_url":"https://github.com/kelceydamage.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DEFUNCT (I am not working on Go at the moment and this project will not receive any updates in the forseable future)\n\n# collections\n[![Build Status](https://travis-ci.org/kelceydamage/collections.svg?branch=master)](https://travis-ci.org/kelceydamage/collections) [![CircleCI](https://circleci.com/gh/kelceydamage/collections/tree/master.svg?style=shield)](https://circleci.com/gh/kelceydamage/collections/tree/master)  [![Coverage Status](https://coveralls.io/repos/github/kelceydamage/collections/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/kelceydamage/collections?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/kelceydamage/collections)](https://goreportcard.com/report/github.com/kelceydamage/collections) [![CodeFactor](https://www.codefactor.io/repository/github/kelceydamage/collections/badge)](https://www.codefactor.io/repository/github/kelceydamage/collections) [![Maintainability](https://api.codeclimate.com/v1/badges/41fec5ebe52b5258ee3b/maintainability)](https://codeclimate.com/github/kelceydamage/collections/maintainability) [![GoDoc](https://godoc.org/github.com/kelceydamage/collections?status.svg)](https://godoc.org/github.com/kelceydamage/collections) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) \n\nimport \"github.com/kelceydamage/collections\"\n\nCollections is a library of types and methods that make manipulating slices a lot easier by providing some basic functionality. \n\nIncluded in collections are a couple interafaces:\n\n### Slice \n\nthis is a base interface and all slice-types in collections implement this interface.\n\n```Go\ntype BaseSlice interface {\n\tAll() []interface{}\n\tOverwrite(interface{})\n\tAppend(interface{})\n\tLen() int\n\tSwap(int, int)\n\tTruncateLeft(int)\n\tTruncateRight(int)\n\tMirror()\n\tIndex(interface{}) int\n\tIndexRight(interface{}) int\n}\n```\n\n```Go\ntype Slice interface {\n\tBaseSlice\n\tSort()\n\tReverse()\n}\n```\n\n```Go\ntype NumSlice interface {\n\tSlice\n\tAvg() float64\n\tAvgNonZero() float64\n\tStdDev() float64\n\tVariance() float64\n}\n``` \n\n### Types\n\n* IntSlice\n* IntSliceM\n* IntQueue\n* IntStack\n* Float64Slice\n* Float64SliceM\n* Float64Queue\n* Float64Stack\n* StringSlice\n* BoolSlice \n\n### Compatibility\n\nCollections is compatible with the built in Sort types, and should be familiar to use. \n\n#### example: \nyou can use a collections.IntSlice as a direct replacement for sort.IntSlice, while using all the features of Sort. This goes for all types included in Sort.\n\n```Go\nsort.Sort(sort.Reverse(sort.IntSlice(s))) \n```\n\nIs the same as:\n \n```Go\nsort.Sort(sort.Reverse(collections.IntSlice(s)))\n```\n\nHowever this is also the same as:\n\n```Go\ncollections.IntSlice.Reverse()\n```\n\nAnd\n\n```Go\ncollections.Reverse(IntSlice)\n```\n\n# Documentation\nhttps://godoc.org/github.com/kelceydamage/collections\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelceydamage%2Fcollections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelceydamage%2Fcollections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelceydamage%2Fcollections/lists"}