{"id":24895210,"url":"https://github.com/jcocozza/go_struct_stringify","last_synced_at":"2025-09-07T10:34:08.081Z","repository":{"id":222712171,"uuid":"758164935","full_name":"jcocozza/go_struct_stringify","owner":"jcocozza","description":"Convert go structs into their corresponding code as a string","archived":false,"fork":false,"pushed_at":"2024-08-08T11:05:06.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T15:26:28.888Z","etag":null,"topics":["golang","stringify","struct"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcocozza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-02-15T18:47:26.000Z","updated_at":"2024-08-08T11:05:09.000Z","dependencies_parsed_at":"2024-03-27T16:50:49.826Z","dependency_job_id":"f8e69f38-72ad-422b-a6be-4f7e3de776d7","html_url":"https://github.com/jcocozza/go_struct_stringify","commit_stats":null,"previous_names":["jcocozza/go_struct_stringify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jcocozza/go_struct_stringify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgo_struct_stringify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgo_struct_stringify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgo_struct_stringify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgo_struct_stringify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcocozza","download_url":"https://codeload.github.com/jcocozza/go_struct_stringify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcocozza%2Fgo_struct_stringify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274026691,"owners_count":25209739,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","stringify","struct"],"created_at":"2025-02-01T19:17:10.513Z","updated_at":"2025-09-07T10:34:07.993Z","avatar_url":"https://github.com/jcocozza.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Struct Stringify\n\nThis package will take a struct instance and convert it into a string.\n\nThe goal is to provide a very easy way to take a struct that exists as an instance and create the code that corresponds to that struct.\n\n```\ntype myStruct struct {\n    A string\n    B int\n}\n\nmyStruct := \u0026{A: \"a\", B: 1}\n\nmyStructString := StructStringify(myStruct)\nfmt.Print(myStructString)\n--\n\u0026myStruct{A: \"a\", B: 1}\n```\n\n## Motivation\n\nYou're writing some integration tests for your code. You trust things to work-- these tests are more of a future proofing endeavor.\nTopping it off, you have to load in some complex objects from the database. Structs with sub-structs, lists of structs, custom types etc. It's going to manually create these objects to verify things are working properly.\n\nHere's were this package comes in, just use the `StructStringify()` function to turn a struct instance (that you just loaded in from your database, for example) into a string. Then all you need to do is print that string, and it will be ready for you to copy and paste where ever you please.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcocozza%2Fgo_struct_stringify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcocozza%2Fgo_struct_stringify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcocozza%2Fgo_struct_stringify/lists"}