{"id":17086567,"url":"https://github.com/arl/assertgo","last_synced_at":"2025-08-17T07:02:59.303Z","repository":{"id":57483178,"uuid":"72680796","full_name":"arl/assertgo","owner":"arl","description":"Conditionally compiled assertions in Go ","archived":false,"fork":false,"pushed_at":"2018-07-02T12:07:53.000Z","size":1119,"stargazers_count":19,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-13T19:44:34.079Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arl.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":"2016-11-02T20:58:51.000Z","updated_at":"2024-05-17T22:17:00.000Z","dependencies_parsed_at":"2022-08-26T14:20:56.279Z","dependency_job_id":null,"html_url":"https://github.com/arl/assertgo","commit_stats":null,"previous_names":["aurelien-rainone/assertgo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arl/assertgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fassertgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fassertgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fassertgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fassertgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arl","download_url":"https://codeload.github.com/arl/assertgo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arl%2Fassertgo/sbom","scorecard":{"id":207339,"data":{"date":"2025-08-11","repo":{"name":"github.com/arl/assertgo","commit":"a1be5afdc8719d5ac40d7870309a501d1a2658d7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"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":"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":"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":"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":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","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":"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":"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"}},{"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: The Unlicense: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T00:04:30.485Z","repository_id":57483178,"created_at":"2025-08-17T00:04:30.485Z","updated_at":"2025-08-17T00:04:30.485Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270816193,"owners_count":24650752,"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-08-17T02:00:09.016Z","response_time":129,"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":"2024-10-14T13:28:57.503Z","updated_at":"2025-08-17T07:02:59.235Z","avatar_url":"https://github.com/arl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# assertgo : Conditionally compiled assertions in Go\n\n[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/arl/assertgo) \n\n## Example\n\n**`main.go`**:\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/arl/assertgo\"\n)\n\nfunc main() {\n\tassert.True(true, \"never printed\")\n\tassert.Truef(false, \"panic and printed if -debug tag on\")\n\tfmt.Println(\"program end\")\n}\n```\n\n\n### Normal run\n\n    $ go run main.go\n    program end\n\nNothing happened because `assert.True()` is conditionnaly compiled to a noop.\n\n\n### Debug run\n\n    $ go run -tags debug main.go\n    2016/11/02 22:43:59 --- --- Debug Assertion Failed --- --- ---\n    panic: sent false to assert.True\n    \n    goroutine 1 [running]:\n    panic(0x496be0, 0xc420062200)\n    \t/usr/local/go/src/runtime/panic.go:500 +0x1a1\n    github.com/arl/assertgo.True(0xc42003ff00, 0x4b5298, 0x19, 0x0, 0x0, 0x0)\n    \t/home/panty/godev/src/github.com/arl/assertgo/assert.go:19 +0x13b\n    main.main()\n    \t/home/panty/godev/src/github.com/arl/tagtest/main.go:10 +0x5a\n    exit status 2\n\nBy providing the `debug` tag to `go build` or any other `go` tool that accepts\n[build tags](https://golang.org/pkg/go/build/), `assert.True` is conditionnaly\ncompiled to a function that calls `panic` if the assertion is `false`.\n\n\n### Benchmarks\n\nWith debug flag:\n\n    $ go test -bench '.*' -run '^$' -tags debug\n    goos: linux\n    goarch: amd64\n    pkg: github.com/arl/assertgo\n    BenchmarkTrue-4         30000000                40.5 ns/op\n    BenchmarkFalse-4        30000000                38.9 ns/op\n    BenchmarkTruef-4        1000000000               2.90 ns/op\n    BenchmarkFalsef-4       300000000                5.91 ns/op\n    PASS\n    ok      github.com/arl/assertgo    8.039s\n\nWithout debug flag, noop (or close):\n\n    $ go test -bench '.*' -run '^$'\n    goos: linux\n    goarch: amd64\n    pkg: github.com/arl/assertgo\n    BenchmarkTrue-4         2000000000               1.82 ns/op\n    BenchmarkFalse-4        2000000000               1.82 ns/op\n    BenchmarkTruef-4        1000000000               2.53 ns/op\n    BenchmarkFalsef-4       1000000000               2.55 ns/op\n    PASS\n    ok      github.com/arl/assertgo    13.260s\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fassertgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farl%2Fassertgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farl%2Fassertgo/lists"}