{"id":26826723,"url":"https://github.com/hslam/sortedlist","last_synced_at":"2025-10-11T15:33:15.552Z","repository":{"id":57545299,"uuid":"220021375","full_name":"hslam/sortedlist","owner":"hslam","description":"Package sortedlist implements sorted list.","archived":false,"fork":false,"pushed_at":"2021-05-26T14:54:38.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-23T06:46:45.475Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hslam.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":"2019-11-06T14:53:53.000Z","updated_at":"2021-05-26T14:54:41.000Z","dependencies_parsed_at":"2022-09-16T23:21:06.136Z","dependency_job_id":null,"html_url":"https://github.com/hslam/sortedlist","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/hslam/sortedlist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fsortedlist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fsortedlist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fsortedlist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fsortedlist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hslam","download_url":"https://codeload.github.com/hslam/sortedlist/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hslam%2Fsortedlist/sbom","scorecard":{"id":470886,"data":{"date":"2025-08-11","repo":{"name":"github.com/hslam/sortedlist","commit":"e9e0c2ed8c8adbe2d32467ec67d3e773ae41f3e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/hslam/sortedlist/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hslam/sortedlist/go.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:24","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:39","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned","Info:   0 out of   2 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T13:52:13.987Z","repository_id":57545299,"created_at":"2025-08-19T13:52:13.988Z","updated_at":"2025-08-19T13:52:13.988Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007604,"owners_count":26084334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-03-30T11:30:44.671Z","updated_at":"2025-10-11T15:33:15.537Z","avatar_url":"https://github.com/hslam.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sortedlist\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/hslam/sortedlist)](https://pkg.go.dev/github.com/hslam/sortedlist)\n[![Build Status](https://github.com/hslam/sortedlist/workflows/build/badge.svg)](https://github.com/hslam/sortedlist/actions)\n[![codecov](https://codecov.io/gh/hslam/sortedlist/branch/master/graph/badge.svg)](https://codecov.io/gh/hslam/sortedlist)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hslam/sortedlist)](https://goreportcard.com/report/github.com/hslam/sortedlist)\n[![LICENSE](https://img.shields.io/github/license/hslam/sortedlist.svg?style=flat-square)](https://github.com/hslam/sortedlist/blob/master/LICENSE)\n\nPackage sortedlist implements a sorted list.\n\n## Get started\n\n### Install\n```\ngo get github.com/hslam/sortedlist\n```\n### Import\n```\nimport \"github.com/hslam/sortedlist\"\n```\n### Usage\n#### Example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/hslam/sortedlist\"\n)\n\nfunc main() {\n\ts := sortedlist.New(sortedlist.LessInt)\n\tfmt.Printf(\"ASC\\t\\t%t\\n\", s.Ascend())\n\n\ts.Insert(1, 1)\n\ts.Insert(3, 2)\n\ts.Insert(3, 3)\n\ts.Insert(5, 4)\n\ts.Insert(6, 4)\n\ts.Insert(2, 5)\n\ts.Insert(2, 6)\n\ts.Insert(4, 7)\n\tprintList(s)\n\n\tfmt.Printf(\"Contain\\t\\tScore:2 Value:5\\t%t\\n\", s.Contain(2, 5))\n\tfmt.Printf(\"Remove\\t\\tScore:2 Value:5\\t%t\\n\", s.Remove(2, 5))\n\tfmt.Printf(\"ContainScore\\tScore:3\\t%t\\n\", s.ContainScore(3))\n\tfmt.Printf(\"RemoveScore\\tScore:3\\t%t\\n\", s.RemoveScore(3))\n\tfmt.Printf(\"ContainValue\\tValue:4\\t%t\\n\", s.ContainValue(4))\n\tfmt.Printf(\"RemoveValue\\tValue:4\\t%t\\n\", s.RemoveValue(4))\n\tprintList(s)\n\n\ttop := s.Top()\n\tfmt.Printf(\"Top\\t\\tScore:%d\\tValue:%d\\n\", top.Score(), top.Value())\n\tbottom := s.Bottom()\n\tfmt.Printf(\"Bottom\\t\\tScore:%d\\tValue:%d\\n\", bottom.Score(), bottom.Value())\n\tprintList(s)\n}\n\nfunc printList(s *sortedlist.SortedList) {\n\tfmt.Println(\"\\n===========Traverse===========\")\n\tcur := s.Front()\n\tfor cur != nil \u0026\u0026 cur != s.Rear() {\n\t\tfmt.Printf(\"Traverse\\tScore:%d\\tValue:%d\\n\", cur.Score(), cur.Value())\n\t\tcur = cur.Next()\n\t}\n\tfmt.Println(\"=============End==============\\n\")\n}\n```\n\n### Output\n```\nASC\t\ttrue\n\n===========Traverse===========\nTraverse\tScore:1\tValue:1\nTraverse\tScore:2\tValue:5\nTraverse\tScore:2\tValue:6\nTraverse\tScore:3\tValue:2\nTraverse\tScore:3\tValue:3\nTraverse\tScore:4\tValue:7\nTraverse\tScore:5\tValue:4\nTraverse\tScore:6\tValue:4\n=============End==============\n\nContain\t\tScore:2 Value:5\ttrue\nRemove\t\tScore:2 Value:5\ttrue\nContainScore\tScore:3\ttrue\nRemoveScore\tScore:3\ttrue\nContainValue\tValue:4\ttrue\nRemoveValue\tValue:4\ttrue\n\n===========Traverse===========\nTraverse\tScore:1\tValue:1\nTraverse\tScore:2\tValue:6\nTraverse\tScore:4\tValue:7\n=============End==============\n\nTop\t\tScore:1\tValue:1\nBottom\t\tScore:4\tValue:7\n\n===========Traverse===========\nTraverse\tScore:2\tValue:6\n=============End==============\n```\n\n### License\nThis package is licensed under a MIT license (Copyright (c) 2019 Meng Huang)\n\n\n### Author\nsortedlist was written by Meng Huang.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhslam%2Fsortedlist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhslam%2Fsortedlist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhslam%2Fsortedlist/lists"}