{"id":13786732,"url":"https://github.com/mafulong/godal","last_synced_at":"2026-01-14T14:35:27.000Z","repository":{"id":51248439,"uuid":"348197383","full_name":"mafulong/godal","owner":"mafulong","description":"godal provides the ability to generate specific golang code. The godal is to enable developers to write fast code in an expressive way.","archived":false,"fork":false,"pushed_at":"2021-10-23T04:38:11.000Z","size":100,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-11T22:40:32.535Z","etag":null,"topics":["go","golang","gorm","gorm-model","orm"],"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/mafulong.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":"2021-03-16T03:09:34.000Z","updated_at":"2024-01-25T20:48:37.000Z","dependencies_parsed_at":"2022-08-27T21:43:22.313Z","dependency_job_id":null,"html_url":"https://github.com/mafulong/godal","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/mafulong/godal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafulong%2Fgodal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafulong%2Fgodal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafulong%2Fgodal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafulong%2Fgodal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mafulong","download_url":"https://codeload.github.com/mafulong/godal/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mafulong%2Fgodal/sbom","scorecard":{"id":611352,"data":{"date":"2025-08-11","repo":{"name":"github.com/mafulong/godal","commit":"d3896c9dbd91c74b37188151cbdbe31b768bf051"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/mafulong/godal/go.yml/main?enable=pin","Warn: goCommand not pinned by hash: .github/workflows/go.yml:25","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T02:43:56.874Z","repository_id":51248439,"created_at":"2025-08-21T02:43:56.874Z","updated_at":"2025-08-21T02:43:56.874Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28423710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["go","golang","gorm","gorm-model","orm"],"created_at":"2024-08-03T19:01:31.622Z","updated_at":"2026-01-14T14:35:26.977Z","avatar_url":"https://github.com/mafulong.png","language":"Go","funding_links":[],"categories":["Go Generate Tools","Go 生成工具","Libraries for creating HTTP middlewares"],"sub_categories":["Routers","路由器"],"readme":"[![GoDoc](https://godoc.org/github.com/mafulong/godal?status.svg)](https://pkg.go.dev/github.com/mafulong/godal)\n[![Codecov.io](https://codecov.io/github/mafulong/godal/coverage.svg?branch=main)](https://codecov.io/github/mafulong/godal?branch=main)\n[![Go Report Card](https://goreportcard.com/badge/github.com/mafulong/godal)](https://goreportcard.com/report/github.com/mafulong/godal)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)\n\ngodal\n===\n\n[English](README.md) | [中文](README_CN.md) \n\ngodal provides the ability to generate specific golang code. The goal is to enable developers to write fast code in an\nexpressive way.\n\nFunctions:\n\n1. Generate orm model corresponding to golang by specifying sql ddl file, which can be used by gorm.\n2. Update later\n\ngodal has been added to [awesome-go](https://awesome-go.com/), [MR link](https://github.com/avelino/awesome-go/pull/3857/)\n## Usage Documentation\n\n## Installation\n\nUsing this package requires a working Go\nenvironment. [See the install instructions for Go](http://golang.org/doc/install.html).\n\nGo Modules are required when using this\npackage. [See the go blog guide on using Go Modules](https://blog.golang.org/using-go-modules).\n\nHow to install godal?\n\n```shell\ngit clone git@github.com:mafulong/godal.git\ncd godal\ngo install\n```\n\nMake sure that you can have result when call commend`which godal`\n\n## SQL to golang model\n\n```shell\ngodal gen model --database {your databaseName} {your sqlFile}\n```\n\n### Example\n\nYou can enter the test directory in this repo.\n\n```shell\ngodal gen model --database testdb gen_model.sql\n```\n\n[What you can get?](https://github.com/mafulong/godal/test/model/)\n\nexample file1:\n\n```go\npackage testdb\n\nimport \"time\"\n\ntype TestTb1 struct {\n\tTestId         int       `gorm:\"Column:test_id\" json:\"test_id\"`\n\tTestTitle      string    `gorm:\"Column:test_title\" json:\"test_title\"`\n\tTestAuthor     string    `gorm:\"Column:test_author\" json:\"test_author\"`\n\tSubmissionDate time.Time `gorm:\"Column:submission_date\" json:\"submission_date\"`\n}\n\nfunc (TestTb1) TableName() string {\n\treturn \"test_tb1\"\n}\n\n```\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafulong%2Fgodal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmafulong%2Fgodal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmafulong%2Fgodal/lists"}