{"id":16766414,"url":"https://github.com/bradleyjkemp/monkey","last_synced_at":"2026-03-14T15:07:12.661Z","repository":{"id":57541941,"uuid":"138769771","full_name":"bradleyjkemp/monkey","owner":"bradleyjkemp","description":"Tampering with unexported fields made easy","archived":false,"fork":false,"pushed_at":"2019-11-22T15:40:00.000Z","size":9,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:51:53.065Z","etag":null,"topics":["go","golang","monkey-patching"],"latest_commit_sha":null,"homepage":"","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/bradleyjkemp.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":"2018-06-26T17:17:41.000Z","updated_at":"2020-09-04T01:47:43.000Z","dependencies_parsed_at":"2022-09-08T23:51:20.386Z","dependency_job_id":null,"html_url":"https://github.com/bradleyjkemp/monkey","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/bradleyjkemp%2Fmonkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyjkemp%2Fmonkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyjkemp%2Fmonkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bradleyjkemp%2Fmonkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bradleyjkemp","download_url":"https://codeload.github.com/bradleyjkemp/monkey/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279639,"owners_count":21077407,"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":["go","golang","monkey-patching"],"created_at":"2024-10-13T06:06:22.112Z","updated_at":"2026-03-14T15:07:07.630Z","avatar_url":"https://github.com/bradleyjkemp.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monkey [![Build Status](https://travis-ci.org/bradleyjkemp/monkey.svg?branch=master)](https://travis-ci.org/bradleyjkemp/monkey) [![Coverage Status](https://coveralls.io/repos/github/bradleyjkemp/monkey/badge.svg)](https://coveralls.io/github/bradleyjkemp/monkey?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/bradleyjkemp/monkey)](https://goreportcard.com/report/github.com/bradleyjkemp/monkey) [![GoDoc](https://godoc.org/github.com/bradleyjkemp/monkey?status.svg)](https://godoc.org/github.com/bradleyjkemp/monkey)\n\nEver wanted to tamper with the value of an unexported field?\nThis library lets you create a small patch value which can be applied to modify unexported fields regardless of how deeply nested they are.\n\n## Usage\n\nSay you have a struct like so:\n```go\ntype CoolLibrary struct {\n\tusefulInternalLogs io.Writer\n\t...\n\t...\n}\n```\nBut you want access to the internal logs which can't be configured to write to a location of your choice.\n\nYou could fork the library and add this feature or just use Monkey to patch this field:\n```go\nlib := CoolLibraryConstructor()\n\ncoolLibraryPatch := struct {\n\tusefulInternalLogs io.Writer\n}{\n\tos.Stdout\n}\n\nmonkey.Patch(\u0026lib, \u0026coolLibraryPatch)\n```\n\nNow your useful internal logs will be written to os.Stdout!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyjkemp%2Fmonkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbradleyjkemp%2Fmonkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbradleyjkemp%2Fmonkey/lists"}