{"id":37197004,"url":"https://github.com/geekchanskiy/enum_codegen","last_synced_at":"2026-01-14T22:54:47.172Z","repository":{"id":308705908,"uuid":"1031013181","full_name":"GeekchanskiY/enum_codegen","owner":"GeekchanskiY","description":"Go enum code generator","archived":false,"fork":false,"pushed_at":"2025-12-21T19:03:58.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-23T07:35:54.791Z","etag":null,"topics":["code-generation","enum","enumeration","enums","generated","go","golang"],"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/GeekchanskiY.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":"2025-08-02T20:19:58.000Z","updated_at":"2025-12-21T19:02:43.000Z","dependencies_parsed_at":"2025-08-07T12:46:39.701Z","dependency_job_id":null,"html_url":"https://github.com/GeekchanskiY/enum_codegen","commit_stats":null,"previous_names":["geekchanskiy/enum_codegen"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/GeekchanskiY/enum_codegen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeekchanskiY%2Fenum_codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeekchanskiY%2Fenum_codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeekchanskiY%2Fenum_codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeekchanskiY%2Fenum_codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeekchanskiY","download_url":"https://codeload.github.com/GeekchanskiY/enum_codegen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeekchanskiY%2Fenum_codegen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28437188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":["code-generation","enum","enumeration","enums","generated","go","golang"],"created_at":"2026-01-14T22:54:46.521Z","updated_at":"2026-01-14T22:54:47.152Z","avatar_url":"https://github.com/GeekchanskiY.png","language":"Go","readme":"# Enum_codegen\n\nPretty enum code generator.\n\n## Links\n - [Overview](#overview)\n - [Requirements](#requirements)\n - [Quick Start](#quick-start)\n - [Generated Code Examples](#generated-code-examples)\n\n## Overview\n\nEnum_codegen is a library for quick enum creation\n\nGenerates `var Tags = map[Enum]string`, `var Types = map[string]Enum`, `var Translations = map[Enum]string`.\nImplements `sql.Scanner`, `driver.Valuer`, `fmt.Stringer`, `json.Marshaler` interfaces.\n\nForces Enum to have default Undefined value.\n\nGenerates snake_case string Enum value: `EnumValue1 -\u003e enum_value_1`\nYou can override default string value, and set translation value \n\n## Requirements\n\n- go 1.23.0 or later\n\n## Quick Start\n\n1. Install enum_codegen:\n\n   ```shell\n   go install github.com/GeekchanskiY/enum_codegen/cmd/enum_codegen\n   ```\n    \n    Before other steps make sure that go/bin is in your $PATH\n    \n\n2. Create a Go file with an enum declaration:\n\n   ```go\n    package main\n\n    //go:generate enum_codegen\n    type Enum int\n    \n    const (\n    // Undefined Translate=\"Undefined value\"\n    Undefined Enum = iota\n    // EnumValue1 Value=\"SuperbValue\" Translate=\"Enum 1\"\n    EnumValue1\n    // EnumValue2 Your documentation here if need Translate=\"Enum 2\" Value=\"MegaValue\"\n    EnumValue2\n    // EnumValue3 Translate=\"Enum 3\"\n    EnumValue3\n    // Translate=\"Some value Enum 4\"\n    EnumValue4\n    EnumValue5\n    )\n   ```\n\n3. Run go generate:\n    \n    you can specify the file to generate from explicitly\n    \n   ```shell\n   go generate package/file.go\n   ```\n   \n    or generate from every file in project. Result will not change\n\n    ```shell\n   go generate ./...\n    ```\n\n## Generated code examples\n[Default usage](examples/default_generation/file_Enum__gen.go)\n\n## TODO's\n- add multi-language support\n- add output map naming customization (Tags, Values, Translations)\n- add unit tests\n- add different string value generators","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekchanskiy%2Fenum_codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeekchanskiy%2Fenum_codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeekchanskiy%2Fenum_codegen/lists"}