{"id":47170043,"url":"https://github.com/lossdev/stack","last_synced_at":"2026-03-13T04:42:16.721Z","repository":{"id":57534010,"uuid":"265276997","full_name":"lossdev/stack","owner":"lossdev","description":"Lightweight, Simple, Quick, Thread-Safe Golang Stack Implementation","archived":false,"fork":false,"pushed_at":"2021-04-11T20:45:47.000Z","size":37,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T15:19:46.496Z","etag":null,"topics":["golang","stack"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lossdev.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":"2020-05-19T14:52:46.000Z","updated_at":"2024-06-21T15:19:46.497Z","dependencies_parsed_at":"2022-09-26T18:21:25.273Z","dependency_job_id":null,"html_url":"https://github.com/lossdev/stack","commit_stats":null,"previous_names":["bmw417/stack"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lossdev/stack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lossdev%2Fstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lossdev%2Fstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lossdev%2Fstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lossdev%2Fstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lossdev","download_url":"https://codeload.github.com/lossdev/stack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lossdev%2Fstack/sbom","scorecard":{"id":599377,"data":{"date":"2025-08-11","repo":{"name":"github.com/lossdev/stack","commit":"9426123dd5f453929f65a9ae8a3b95ac0921d450"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"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: BSD 3-Clause \"New\" or \"Revised\" 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-21T00:00:01.393Z","repository_id":57534010,"created_at":"2025-08-21T00:00:01.393Z","updated_at":"2025-08-21T00:00:01.393Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30458089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: 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":["golang","stack"],"created_at":"2026-03-13T04:42:16.262Z","updated_at":"2026-03-13T04:42:16.706Z","avatar_url":"https://github.com/lossdev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stack\r\n\r\n[![GoDoc](https://godoc.org/github.com/lossdev/stack?status.png)](http://godoc.org/github.com/lossdev/stack)\r\n[![Go Report Card](https://goreportcard.com/badge/github.com/lossdev/stack)](https://goreportcard.com/report/github.com/lossdev/stack)\r\n[![Go Coverage](https://codecov.io/github/lossdev/stack/coverage.svg)](https://codecov.io/github/lossdev/stack/)\r\n\r\nLightweight, Simple, Quick, Thread-Safe Golang Stack Implementation\r\n\r\n\r\n## Purpose\r\n\r\nProvide a fast, thread safe, and generic Golang Stack API with minimal external linkage\r\nand maximum performance and usability.\r\n\r\n\r\n## Installation\r\n\r\n``` bash\r\ngo get -d -v github.com/lossdev/stack\r\n```\r\n\r\n## Example\r\n\r\n``` Go\r\npackage main\r\n\r\nimport (\r\n    \"github.com/lossdev/stack\"\r\n    \"log\"\r\n    \"fmt\"\r\n)\r\n\r\ntype foo struct {\r\n    bar string\r\n    baz bool\r\n}\r\n\r\nfunc main() {\r\n    // declare a new Stack 's' with int type (stack.Int)\r\n    s := stack.NewStack(stack.Int)\r\n    if err := s.Push(1); err != nil {\r\n        log.Println(err)\r\n    }\r\n    if recv, err := stack.ToInt(s.Peek()); err != nil {\r\n        log.Println(err)\r\n    } else {\r\n        fmt.Println(recv)\r\n    }\r\n    // Adding a member of a different type than what s is declared as will error\r\n    if err := s.Push(\"Hello, World!\"); err != nil {\r\n        log.Println(err)\r\n    }\r\n    gs := stack.NewGenericStack()\r\n    f := foo{\"Hello, World!\", true}\r\n    gs.Push(f)\r\n    if recv, err := gs.Peek(); err != nil {\r\n        log.Println(err)\r\n    } else {\r\n        // type assertion needed\r\n        frecv := recv.(foo)\r\n        fmt.Printf(\"GenericStack: {%s, %t}\\n\", frecv.bar, frecv.baz)\r\n    }\r\n}\r\n```\r\n\r\n``` bash\r\n$ go run example.go\r\n1\r\n2021/04/07 13:31:52 Push(): expected: [int]; received: [string]\r\nGenericStack: {Hello, World!, true}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flossdev%2Fstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flossdev%2Fstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flossdev%2Fstack/lists"}