{"id":13690540,"url":"https://github.com/judwhite/go-svc","last_synced_at":"2026-01-14T15:16:51.366Z","repository":{"id":47742470,"uuid":"52064360","full_name":"judwhite/go-svc","owner":"judwhite","description":"Go Windows Service wrapper that plays nice with Linux.","archived":false,"fork":false,"pushed_at":"2024-07-25T15:21:03.000Z","size":128,"stargazers_count":492,"open_issues_count":8,"forks_count":83,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-05-02T11:43:38.425Z","etag":null,"topics":["service","windows-service","windows-services"],"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/judwhite.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-19T05:44:23.000Z","updated_at":"2025-04-16T08:21:21.000Z","dependencies_parsed_at":"2024-11-12T16:36:31.928Z","dependency_job_id":null,"html_url":"https://github.com/judwhite/go-svc","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/judwhite/go-svc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judwhite%2Fgo-svc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judwhite%2Fgo-svc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judwhite%2Fgo-svc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judwhite%2Fgo-svc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/judwhite","download_url":"https://codeload.github.com/judwhite/go-svc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/judwhite%2Fgo-svc/sbom","scorecard":{"id":540847,"data":{"date":"2025-08-11","repo":{"name":"github.com/judwhite/go-svc","commit":"a2deda217eb3db0e1264c3386d5e41f8c8b08207"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/judwhite/go-svc/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/judwhite/go-svc/test.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/test.yml:29","Warn: goCommand not pinned by hash: .github/workflows/test.yml:38","Warn: goCommand not pinned by hash: .github/workflows/test.yml:43","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 goCommand 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":"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":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":"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":"Code-Review","score":1,"reason":"Found 4/27 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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.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":"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: 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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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-20T08:10:36.180Z","repository_id":47742470,"created_at":"2025-08-20T08:10:36.180Z","updated_at":"2025-08-20T08:10:36.180Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["service","windows-service","windows-services"],"created_at":"2024-08-02T17:00:21.145Z","updated_at":"2026-01-14T15:16:51.344Z","avatar_url":"https://github.com/judwhite.png","language":"Go","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# go-svc\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/judwhite/go-svc.svg)](https://pkg.go.dev/github.com/judwhite/go-svc)\n[![MIT License](https://img.shields.io/badge/license-MIT-007d9c)](https://github.com/judwhite/go-svc/blob/main/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/judwhite/go-svc)](https://goreportcard.com/report/github.com/judwhite/go-svc)\n[![Build Status](https://github.com/judwhite/go-svc/workflows/tests/badge.svg)](https://github.com/judwhite/go-svc/actions?query=workflow%3Atests)\n\nGo Windows Service wrapper that plays nice with Linux. Windows tests [here](https://github.com/judwhite/go-svc/blob/main/svc_windows_test.go).\n\n## Project Status\n\n- Used in Production.\n- Maintained. Issues and Pull Requests will be responded to.\n\n## Go Modules\n\n* Please note the `import` path and `go.mod` change from `github.com/judwhite/go-svc/svc` to `github.com/judwhite/go-svc` for `v1.2+`\n* `v1.1.3` and earlier can be imported using the previous import path\n* `v1.2+` code is backwards compatible with previous versions\n\n```nginx no-this-isnt-nginx-but-the-syntax-highlighting-works\nmodule awesomeProject\n\ngo 1.15\n\nrequire github.com/judwhite/go-svc v1.2.0\n```\n\n```go\nimport \"github.com/judwhite/go-svc\"\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"sync\"\n\n\t\"github.com/judwhite/go-svc\"\n)\n\n// program implements svc.Service\ntype program struct {\n\twg   sync.WaitGroup\n\tquit chan struct{}\n}\n\nfunc main() {\n\tprg := \u0026program{}\n\n\t// Call svc.Run to start your program/service.\n\tif err := svc.Run(prg); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n\nfunc (p *program) Init(env svc.Environment) error {\n\tlog.Printf(\"is win service? %v\\n\", env.IsWindowsService())\n\treturn nil\n}\n\nfunc (p *program) Start() error {\n\t// The Start method must not block, or Windows may assume your service failed\n\t// to start. Launch a Goroutine here to do something interesting/blocking.\n\n\tp.quit = make(chan struct{})\n\n\tp.wg.Add(1)\n\tgo func() {\n\t\tlog.Println(\"Starting...\")\n\t\t\u003c-p.quit\n\t\tlog.Println(\"Quit signal received...\")\n\t\tp.wg.Done()\n\t}()\n\n\treturn nil\n}\n\nfunc (p *program) Stop() error {\n\t// The Stop method is invoked by stopping the Windows service, or by pressing Ctrl+C on the console.\n\t// This method may block, but it's a good idea to finish quickly or your process may be killed by\n\t// Windows during a shutdown/reboot. As a general rule you shouldn't rely on graceful shutdown.\n\n\tlog.Println(\"Stopping...\")\n\tclose(p.quit)\n\tp.wg.Wait()\n\tlog.Println(\"Stopped.\")\n\treturn nil\n}\n```\n\n## More Examples\n\nSee the [example](https://github.com/judwhite/go-svc/tree/main/example) directory for more examples, including installing and uninstalling binaries built in Go as Windows services.\n\n## Similar Projects\n\n- https://github.com/kardianos/service\n\n## License\n\n`go-svc` is under the MIT license. See the [LICENSE](https://github.com/judwhite/go-svc/blob/main/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjudwhite%2Fgo-svc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjudwhite%2Fgo-svc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjudwhite%2Fgo-svc/lists"}