{"id":13413900,"url":"https://github.com/dedalqq/omg.testingtools","last_synced_at":"2026-01-12T12:48:54.044Z","repository":{"id":144338071,"uuid":"416762770","full_name":"dedalqq/omg.testingtools","owner":"dedalqq","description":"This tool can be useful for writing a tests. If you want change private field in struct from imported libraries than it can help you.","archived":false,"fork":false,"pushed_at":"2021-10-14T23:05:20.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-22T13:32:16.401Z","etag":null,"topics":["go","golang","reflection","testing"],"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/dedalqq.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}},"created_at":"2021-10-13T13:49:30.000Z","updated_at":"2022-09-27T09:28:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f1d1dad-c576-475c-bf83-ddf33164a56f","html_url":"https://github.com/dedalqq/omg.testingtools","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.testingtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.testingtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.testingtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalqq%2Fomg.testingtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedalqq","download_url":"https://codeload.github.com/dedalqq/omg.testingtools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243641982,"owners_count":20323943,"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","reflection","testing"],"created_at":"2024-07-30T20:01:52.321Z","updated_at":"2026-01-12T12:48:54.038Z","avatar_url":"https://github.com/dedalqq.png","language":"Go","readme":"# omg.testingTools\n\n[![Go](https://github.com/dedalqq/omg.testingtools/actions/workflows/go.yml/badge.svg)](https://github.com/dedalqq/omg.testingtools/actions/workflows/go.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/dedalqq/omg.testingtools)](https://goreportcard.com/report/github.com/dedalqq/omg.testingtools)\n[![Coverage Status](https://coveralls.io/repos/github/dedalqq/omg.testingtools/badge.svg?branch=master)](https://coveralls.io/github/dedalqq/omg.testingtools?branch=master)\n[![Go Reference](https://pkg.go.dev/badge/github.com/dedalqq/omg.testingtools.svg)](https://pkg.go.dev/github.com/dedalqq/omg.testingtools)\n\nThis tool can be useful for writing a tests. If you want change private field in struct from imported libraries than it can help you.\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"strings\"\n\t\n\t\"github.com/dedalqq/omg.testingtools\"\n)\n\nfunc TestSomeCase(t *testing.T) {\n\tbuffer := strings.Builder{}\n\t\n\ttestingtools.SetPrivateValue(\u0026buffer, \"buf\", []byte(\"data in strings buffer\"))\n}\n```\n## How it works\n\nThis function finding needs field via `reflect` then get pointer from field address via `unsafe.Pointer` and write value via variable with the same address as original struct field.\n","funding_links":[],"categories":["Testing","测试","Template Engines","Testing Frameworks"],"sub_categories":["Testing Frameworks","HTTP客户端","HTTP Clients"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalqq%2Fomg.testingtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedalqq%2Fomg.testingtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalqq%2Fomg.testingtools/lists"}