{"id":18085423,"url":"https://github.com/xe/gopreload","last_synced_at":"2025-04-12T20:24:13.532Z","repository":{"id":144201804,"uuid":"85996589","full_name":"Xe/gopreload","owner":"Xe","description":"LD_PRELOAD for the gopher crowd","archived":false,"fork":false,"pushed_at":"2017-03-26T04:34:30.000Z","size":13,"stargazers_count":25,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T11:52:11.209Z","etag":null,"topics":["completed-project","go","ld-preload"],"latest_commit_sha":null,"homepage":"https://christine.website/blog/gopreload-2017-03-25","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/Xe.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":"2017-03-23T20:54:29.000Z","updated_at":"2023-09-14T16:59:14.000Z","dependencies_parsed_at":"2023-06-18T04:34:00.055Z","dependency_job_id":null,"html_url":"https://github.com/Xe/gopreload","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Fgopreload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Fgopreload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Fgopreload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xe%2Fgopreload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xe","download_url":"https://codeload.github.com/Xe/gopreload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248626885,"owners_count":21135754,"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","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":["completed-project","go","ld-preload"],"created_at":"2024-10-31T15:11:14.678Z","updated_at":"2025-04-12T20:24:13.507Z","avatar_url":"https://github.com/Xe.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"gopreload\n=========\n\nAn emulation of the linux libc `LD_PRELOAD` except for use with Go plugins for\nthe addition of instrumentation and debugging utilities.\n\n## Pluginizer\n\n`pluginizer` is a bit of glue that makes it easier to turn underscore imports\ninto plugins:\n\n```console\n$ go get github.com/Xe/gopreload/cmd/pluginizer\n$ pluginizer -help\nUsage of pluginizer:\n  -dest string\n        destination package to generate\n  -pkg string\n        package to underscore import\n$ pluginizer -pkg github.com/lib/pq -dest github.com/Xe/gopreload/database/postgres\nTo build this plugin:\n  $ go build -buildmode plugin -o /path/to/output.so github.com/Xe/gopreload/database/postgres\n```\n\n### Database drivers\n\nI have included plugin boilerplate autogenned versions of the sqlite, postgres\nand mysql database drivers.\n\n## Manhole\n\n[`manhole`][manhole] is an example of debugging and introspection tooling that has\nbeen useful when debugging past issues with long-running server processes.\n\n## Security Implications\n\nThis package assumes that programs run using it are never started with environment\nvariables that are set by unauthenticated users. Any errors in loading the plugins\nwill be logged using the standard library logger `log` and ignored.\n\nThis has about the same security implications as [`LD_PRELOAD`][ld-preload] does in most\nLinux distributions, but the risk is minimal compared to the massive benefit for\nbeing able to have arbitrary background services all be able to be dug into using\nthe same tooling or being able to have metric submission be completely separated\nfrom the backend metric creation. Common logging setup processes can be _always_\nloaded, making the default logger settings into the correct settings.\n\n---\n\n[manhole]: https://github.com/Xe/gopreload/tree/master/manhole\n[ld-preload]: https://rafalcieslak.wordpress.com/2013/04/02/dynamic-linker-tricks-using-ld_preload-to-cheat-inject-features-and-investigate-programs/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxe%2Fgopreload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxe%2Fgopreload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxe%2Fgopreload/lists"}