{"id":14974132,"url":"https://github.com/thisissoon/gokit","last_synced_at":"2026-02-26T18:05:48.893Z","repository":{"id":47862402,"uuid":"163991428","full_name":"thisissoon/gokit","owner":"thisissoon","description":"A set of common packages for building applications in Go at SOON_","archived":false,"fork":false,"pushed_at":"2025-02-06T09:32:52.000Z","size":222,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-27T06:33:43.702Z","etag":null,"topics":["config","go","grpc","http","psql","pubsub"],"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/thisissoon.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-03T15:39:23.000Z","updated_at":"2025-08-25T16:45:13.000Z","dependencies_parsed_at":"2023-02-04T02:18:26.324Z","dependency_job_id":"e8aa6303-2820-488b-abf7-3152edb27e8a","html_url":"https://github.com/thisissoon/gokit","commit_stats":{"total_commits":64,"total_committers":5,"mean_commits":12.8,"dds":0.625,"last_synced_commit":"36e7b1bcf6c6223fbb7cabb8843dd3e0acc77655"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thisissoon/gokit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisissoon%2Fgokit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisissoon%2Fgokit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisissoon%2Fgokit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisissoon%2Fgokit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thisissoon","download_url":"https://codeload.github.com/thisissoon/gokit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thisissoon%2Fgokit/sbom","scorecard":{"id":881710,"data":{"date":"2025-08-11","repo":{"name":"github.com/thisissoon/gokit","commit":"ffef3b7dbeaa5369f694788fa905cf24b4e27898"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","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":"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":"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":"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":"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":"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":"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":"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 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"}},{"name":"Vulnerabilities","score":0,"reason":"34 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-2153 / GHSA-m425-mq94-257g / GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2025-3372 / GHSA-6wxm-mpqj-6jpf","Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-1572 / GHSA-qgc7-mgm3-q253","Warn: Project is vulnerable to: GO-2023-1990 / GHSA-j3p8-6mrq-6g7h","Warn: Project is vulnerable to: GO-2023-1989 / GHSA-x92r-3vfx-4cv3","Warn: Project is vulnerable to: GO-2024-2937 / GHSA-9phm-fm57-rhg8","Warn: Project is vulnerable to: GO-2022-0536 / GHSA-39qc-96h7-956f / GHSA-hgr8-6h9x-f7q9","Warn: Project is vulnerable to: GO-2022-0236 / GHSA-h86h-8ppg-mxmh","Warn: Project is vulnerable to: GO-2021-0238 / GHSA-83g2-8m93-v3w7","Warn: Project is vulnerable to: GO-2022-0288","Warn: Project is vulnerable to: GO-2022-0969 / GHSA-69cg-p879-7622","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2020-0015 / GHSA-5rcv-m4m3-hfh7","Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp","Warn: Project is vulnerable to: GO-2024-2978 / GHSA-xr7q-jx4m-x55m"],"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-24T08:28:04.271Z","repository_id":47862402,"created_at":"2025-08-24T08:28:04.271Z","updated_at":"2025-08-24T08:28:04.271Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29867155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T16:38:37.846Z","status":"ssl_error","status_checked_at":"2026-02-26T16:37:58.932Z","response_time":89,"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":["config","go","grpc","http","psql","pubsub"],"created_at":"2024-09-24T13:50:00.781Z","updated_at":"2026-02-26T18:05:48.854Z","avatar_url":"https://github.com/thisissoon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kit\n\n[![CircleCI](https://circleci.com/gh/thisissoon/gokit.svg?style=svg)](https://circleci.com/gh/thisissoon/gokit)\n[![Go Report Card](https://goreportcard.com/badge/go.soon.build/kit)](https://goreportcard.com/report/go.soon.build/kit)\n\nA set of common packages for building applications in Go at SOON_.\nThe packages are split into modules to enable granular control\nover dependencies.\n\n## Modules\n\n### Config\nCommon configuration management with [viper](https://github.com/spf13/viper). Supports toml files, auto ENV var bindings and cobra command flag overrides.\n```\ngo get go.soon.build/kit/config\n```\n\n### gRPC\nCommon helper constructs for running a gRPC server.\n```\ngo get go.soon.build/kit/grpc\n```\n\n### HTTP\nCommon helper constructs for running a HTTP server, using the `http.Handler` pattern from the standard library.\n```\ngo get go.soon.build/kit/http\n```\n\n### PSQL\nCommon helpers for managing postgres database connections and migrations.\n```\ngo get go.soon.build/kit/psql\n```\n\n### PubSub\nA super minimal publish/subscribe interface with backend implementations for different providers:\n - Google Cloud PubSub\n```\ngo get go.soon.build/kit/pubsub\n```\n\n### Tracing\n\nSmall, opinionated wrappers and helpers for easily setting up tracing in a streamlined fashion.\n\nCurrently only supports Google Cloud's tracing service as a target, using OpenTelemtry.\n\n```\ngo get go.soon.build/kit/tracing/otel\n```\n\nPlease note that currently this package mainly revolves around setting up the OpenTelemtry SDK, and actual instrumentation of an application should (mostly) make use of existing packages such as otelhttp, otelgrpc, otel itself, etc.\n\nThe main helper method for actually creating spans is `OtelProvider.StartSpan` as there is no direct equivalent for creating a span directly from just a context object within the native SDK.\n\nHere are some example snippets:\n\n```go\n// Initial setup\nprovider, err := NewOtelProvider(\"service-name\",\n    WithServiceNamespace(\"important-project\"),\n    WithServiceVersion(\"0.1.0\"),\n    WithGcpExporter(\"my-gcp-project-id\"),\n)\nif err != nil {\n    return err\n}\n\ncleanup, err := provider.SetupGlobalState(context.TODO())\nif err != nil {\n    return err\n}\ndefer cleanup()\n\n// Getting the current span from a context (normal OTEL SDK)\nspan := trace.SpanFromContext(ctx)\nspan.RecordError(...)\nyada yada\n\n// Creating a new span using a context (using this library)\nctx, span := provider.StartSpan(ctx, \"span name\")\ndefer span.End()\n\n// Instrumenting a HTTP handler after setup is complete (otelhttp library)\nhandler := http.HandlerFunc(...)\nwrapper := otelhttp.NewHandler(handler, \"/myEndpoint\")\n\n// Instrumenting a HTTP request (otelhttp library)\nclient := \u0026http.Client{\n    Transport: otelhttp.NewTransport(http.DefaultTransport),\n    Timeout:   time.Second * 30,\n}\nreq := http.NewRequestWithContext(ctx, ...)\nres, err := client.Do(req)\n\n// Instrumenting a GRPC server (otelgrpc library)\nsrv := grpc.NewServer(\n    grpc.ChainUnaryInterceptor(\n        otelgrpc.UnaryServerInterceptor(),\n    ),\n    grpc.ChainStreamInterceptor(\n        otelgrpc.StreamServerInterceptor(),\n    ),\n)\n\n// Instrumenting a GRPC client (otelgrpc library)\nconn, err := grpc.DialContext( // Alternatively: grpckit.NewClient\n    ctx,\n    addr,\n    grpc.WithChainStreamInterceptor(otelgrpc.StreamClientInterceptor()),\n    grpc.WithChainUnaryInterceptor(otelgrpc.UnaryClientInterceptor()),\n)\n\n// Creating a dummy tracer for unittests (normal OTEL SDK)\ntp := trace.NewNoopTracerProvider().Tracer(\"\")\n\n// Recording an error in a way that GCP Cloud Trace likes (this library)\nerr := errors.New(\"blah\")\nspan := ...\notelkit.SpanRecordError(span, err, \"when decoding JSON\")\n\n// Preventing traces from occurring on certain grpc endpoints (this library)\nsrv := grpc.NewServer(\n    grpc.ChainUnaryInterceptor(\n        otelgrpc.UnaryServerInterceptor(\n            otelgrpc.WithInterceptorFilter(\n                otelkit.FilterMethods(\"/abc.Service/Method\", \"/def.Service/Method\")\n            )\n        ),\n    ),\n)\n\n// linking logs to a span\nprovider, err := NewOtelProvider(\"service-name\",\n\totelkit.WithGCPTraceLogger(),\n)\nctx, span := s.tracer.Start(stream.Context(), \"UpdateRedirects\")\ndefer span.End()\nlog := zerolog.Ctx(ctx)\nlog.Info().Msg(\"this will including the span and trace id\")\n```\n\n## Development\n\n### Tests\n\nTo run the test suite with coverage report:\n```\nmake test\n```\n\nTo run pubsub tests with gcloud emulator:\n```bash\n❯ gcloud beta emulators pubsub start\n...\n❯ $(gcloud beta emulators pubsub env-init)\n❯ make testgcloud\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisissoon%2Fgokit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthisissoon%2Fgokit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthisissoon%2Fgokit/lists"}