{"id":36561237,"url":"https://github.com/dank/go-csgsi","last_synced_at":"2026-02-18T01:51:04.121Z","repository":{"id":57544647,"uuid":"49676624","full_name":"dank/go-csgsi","owner":"dank","description":"A library written in Go for Counter-Strike: Global Offensive's Game State Integration.","archived":false,"fork":false,"pushed_at":"2018-03-24T04:03:19.000Z","size":5,"stargazers_count":29,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-12T14:56:46.923Z","etag":null,"topics":["counter-strike","csgo","go"],"latest_commit_sha":null,"homepage":null,"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/dank.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-01-14T21:34:13.000Z","updated_at":"2025-12-29T13:39:19.000Z","dependencies_parsed_at":"2022-08-27T04:22:01.134Z","dependency_job_id":null,"html_url":"https://github.com/dank/go-csgsi","commit_stats":null,"previous_names":["nicememe/go-csgsi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dank/go-csgsi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank%2Fgo-csgsi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank%2Fgo-csgsi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank%2Fgo-csgsi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank%2Fgo-csgsi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dank","download_url":"https://codeload.github.com/dank/go-csgsi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dank%2Fgo-csgsi/sbom","scorecard":{"id":321003,"data":{"date":"2025-08-11","repo":{"name":"github.com/dank/go-csgsi","commit":"026a5c0b8a8d7bda550ac4bc2cb81ac491430417"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/4 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":-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":"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":"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":"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: 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"}}]},"last_synced_at":"2025-08-18T01:21:58.614Z","repository_id":57544647,"created_at":"2025-08-18T01:21:58.614Z","updated_at":"2025-08-18T01:21:58.614Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"ssl_error","status_checked_at":"2026-02-18T00:45:26.718Z","response_time":100,"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":["counter-strike","csgo","go"],"created_at":"2026-01-12T06:50:32.551Z","updated_at":"2026-02-18T01:51:04.116Z","avatar_url":"https://github.com/dank.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-csgsi\n\nA library written in Go for Counter-Strike: Global Offensive's Game State Integration.\n\n## About\n\nThe `go-csgsi` package listens on a specified port waiting for a HTTP POST request by CS:GO. Once a request is received, it is parsed and ready for the end user.\n\nThis information can be continuously retrieved and analyzed using a [Channel](https://tour.golang.org/concurrency/2). (See usage \u0026 example)\n\n[Read more about Valve's Game State Integration](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration)\n\n## Installation\n\nVia [Go](https://golang.org/):\n\n```\n$ go get -u github.com/dank/go-csgsi\n```\n\n# Usage\n\nTo initialize the library:\n```go\n// size int - Size of the channel\ngame := csgsi.New(10)\n```\n\nTo receive updates, read from the channel provided: `game.Channel`:\n\n```go\n// Example 1 - Looping (blocking)\nfor state := range game.Channel {\n\tfmt.Println(state.Player.SomeData)\n}\n// End\n\n// Example 2 - Wait for a state object to come in (blocking)\nstate := \u003c-game.Channel\nfmt.Println(state.Player.SomeData)\n// End\n\n// Example 3 - User creates a func and runs it in a Go routine (thread) (non-blocking)\ngo func() {\n    for state := range game.Channel {\n\t\tfmt.Println(state.Player.SomeData)\n\t}\n}()\n// My non-blocked code can go here!!!\n// End\n```\n\nTo start listening to an address:\n```go\n// address string - TCP address to listen on\ngame.Listen(\":3000\") // localhost:3000\ngame.Listen(\"8.8.4.4:3000\") // 8.8.4.4:3000\n```\n\nFull struct layout:\n```\nState\n    .Provider\n        .Name; string\n        .AppId; int\n        .Version; int\n        .SteamId; string\n        .Timestamp; float32\n    .Map\n        .Name; string\n        .Phase; string\n        .Round; int\n        .Team_ct\n            .Score; int\n        .Team_t\n            .Score; int\n    .Round\n        .Phase; string\n        .Win_team; string\n        .Bomb; string\n    .Player // Note: Once you're dead, this will become the player you are spectating\n        .SteamId; string\n        .Name; string\n        .Name; string\n        .Team; string\n        .Activity; string\n        .State\n            .Health; int\n            .Armor; int\n            .Helmet; bool\n            .Flashed; int\n            .Smoked; int\n            .Burning; int\n            .Money; int\n            .Round_kills; int\n            .Round_killhs; int\n        .Weapons\n            []; string - weapon_0, weapon_1, weapon_2 ...\n                .Name; string\n                .PaintKit; string\n                .Type; string\n                .State; string\n                .Ammo_clip; int\n                .Ammo_clip_max; int\n                .Ammo_reserve; int\n        .Match_stats\n            .Kills; int\n            .Assists; int\n            .Deaths; int\n            .Mvps; int\n            .Score; int\n        .AllPlayers\n            []; string - steamid64 ...\n                .Player; Player\n        .Previously\n                .State; State\n        .Added\n            .State; State\n        .Auth\n            .Token; string\n```\n## Example\n\nPrints weapon stats (name, ammo) when weapon is active:\n```go\nfunc main()  {\n\tgame := csgsi.New(0)\n\n    go func() {\n\t\tfor state := range game.Channel {\n\t\t\tfor weapon := range state.Player.Weapons {\n\t\t\t\tweapon := state.Player.Weapons[weapon]\n\t\t\t\tif(weapon.State == \"active\") {\n\t\t\t\t\tfmt.Printf(\"%s %d/%d\\n\", weapon.Name, weapon.Ammo_clip, weapon.Ammo_reserve) // =\u003e weapon_glock 20/120\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}()\n\n\tgame.Listen(\":3000\")\n}\n```\n\nYou'll need to create a `gamestate_integration_*.cfg` file under `csgo/cfg` in your CS:GO installation directory. For example, `gamestate_integration_consolesample.cfg`:\n\n```\n\"Console Sample v.1\"\n{\n    \"uri\" \"http://127.0.0.1:3000\"\n    \"timeout\" \"5.0\"\n    \"buffer\"  \"0.1\"\n    \"throttle\" \"0.5\"\n    \"heartbeat\" \"60.0\"\n    \"auth\"\n    {\n        \"token\" \"SuperSecretPassword\"\n    }\n    \"data\"\n    {\n        \"provider\"            \"1\"\n        \"map\"                 \"1\"\n        \"round\"               \"1\"\n        \"player_id\"           \"1\"\n        \"player_state\"        \"1\"\n        \"player_weapons\"      \"1\"\n        \"player_match_stats\"  \"1\"\n    }\n}\n```\n\n[from Valve's wiki.](https://developer.valvesoftware.com/wiki/Counter-Strike:_Global_Offensive_Game_State_Integration)\n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2016 Dan Kyung\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdank%2Fgo-csgsi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdank%2Fgo-csgsi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdank%2Fgo-csgsi/lists"}